[GH-ISSUE #271] Can't find files that are clearly right there #189

Closed
opened 2026-03-01 21:41:02 +03:00 by kerem · 4 comments
Owner

Originally created by @Pomax on GitHub (Jun 7, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/271

Somehow act is doing something odd to the container, Using the following script in my package.json:

  "scripts": {
    "clean": "ls . && node ./tools/clean-locales.js",
    ...
 }

and invoking that, shows a dir listing that makes sense:

|    68 drwxr-xr-x   4 root root    65536 Jun  7 22:36  .
|     4 drwxr-xr-x   5 root root     4096 Jun  7 17:23  ..
|     4 -rw-rw-rw-   1 root root       35 Nov 24  2019  .babelrc
|     4 -rw-rw-rw-   1 root root      544 Nov 24  2019  .eslintrc
|     4 -rw-rw-rw-   1 root root     1901 Jun  7 22:19 '.github\workflows\ci.yml'
|     4 -rw-rw-rw-   1 root root      506 Nov 24  2019  .gitignore
|     4 -rw-rw-rw-   1 root root        1 Nov 24  2019  .nojekyll
|     4 -rw-rw-rw-   1 root root      723 Nov 24  2019  LICENSE.md
|     4 -rw-rw-rw-   1 root root     3037 Apr 28 17:53  README.md
|     4 drwxr-xr-x   2 root root     4096 Jun  7 22:13 '\github\workspace'
\|   680 -rw-rw-rw-   1 root root   695256 Jun  7 16:17 'en-GB\article.js'
|    16 -rw-rw-rw-   1 root root    13505 Jun  7 16:16 'en-GB\index.html'
|    16 -rw-rw-rw-   1 root root    15466 Nov 24  2019  favicon.png
|    16 -rw-rw-rw-   1 root root    13474 Jun  7 16:18  index.html
|     8 -rw-rw-rw-   1 root root     6185 Nov 24  2019  index.template.html
|    20 drwxr-xr-x 672 root root    20480 Jun  7 22:36  node_modules
|   452 -rw-rw-rw-   1 root root   461855 Jan  5 20:07  package-lock.json
|     4 -rw-rw-rw-   1 root root     3771 Jun  7 22:32  package.json
|     4 -rw-rw-rw-   1 root root     1301 Nov 24  2019 'tools\aggregate-js-handlers.js'
|     4 -rw-rw-rw-   1 root root      331 Nov 24  2019 'tools\buildmark.js'
|     4 -rw-rw-rw-   1 root root      216 Nov 24  2019 'tools\clean-locales.js'
|     4 -rw-rw-rw-   1 root root      810 Nov 24  2019 'tools\cleanup.js'
|     4 -rw-rw-rw-   1 root root      732 Nov 24  2019 'tools\copy-default-locale.js'
|     4 -rw-rw-rw-   1 root root     1284 Nov 24  2019 'tools\deploy.js'
|     4 -rw-rw-rw-   1 root root      569 Nov 24  2019 'tools\find-locales.js'
|     4 -rw-rw-rw-   1 root root     1569 Nov 24  2019 'tools\form-section-index-files.js'
|     8 -rw-rw-rw-   1 root root     7794 Nov 24  2019 'tools\generate-page-content.js'
|    12 -rw-rw-rw-   1 root root    11948 Nov 24  2019 'tools\lib\chunk.js'
|     4 -rw-rw-rw-   1 root root      315 Nov 24  2019 'tools\lib\jsx-shim.js'
|     8 -rw-rw-rw-   1 root root     4218 Nov 24  2019 'tools\tex-to-svg.js'
|     4 -rw-rw-rw-   1 root root     1969 Nov 24  2019 'tools\watch-file-changes.js'
|     4 -rw-rw-rw-   1 root root     1754 Nov 24  2019  webpack.config.js

So: cool, the tools dir exists and has .js files in it for Node to run.

However, part two immediately fails:

| > bezierinfo@2.0.0 clean /github/workspace
| > node ./tools/clean-locales.js
|
| internal/modules/cjs/loader.js:985
|   throw err;
|   ^
|
| Error: Cannot find module '/github/workspace/tools/clean-locales.js'
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:864:27)
|     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
|     at internal/main/run_main_module.js:18:47 {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: []
| }
| npm ERR! code ELIFECYCLE
| npm ERR! errno 1
| npm ERR! bezierinfo@2.0.0 clean: `node ./tools/clean-locales.js`
| npm ERR! Exit status 1

Why is that /github/workspace getting appending? That's nowhere in my scripts, it's nowhere in the run, it should in fact be nowhere at all, yet something's putting it there. It shouldn't.

Originally created by @Pomax on GitHub (Jun 7, 2020). Original GitHub issue: https://github.com/nektos/act/issues/271 Somehow `act` is doing something odd to the container, Using the following script in my package.json: ``` "scripts": { "clean": "ls . && node ./tools/clean-locales.js", ... } ``` and invoking that, shows a dir listing that makes sense: ``` | 68 drwxr-xr-x 4 root root 65536 Jun 7 22:36 . | 4 drwxr-xr-x 5 root root 4096 Jun 7 17:23 .. | 4 -rw-rw-rw- 1 root root 35 Nov 24 2019 .babelrc | 4 -rw-rw-rw- 1 root root 544 Nov 24 2019 .eslintrc | 4 -rw-rw-rw- 1 root root 1901 Jun 7 22:19 '.github\workflows\ci.yml' | 4 -rw-rw-rw- 1 root root 506 Nov 24 2019 .gitignore | 4 -rw-rw-rw- 1 root root 1 Nov 24 2019 .nojekyll | 4 -rw-rw-rw- 1 root root 723 Nov 24 2019 LICENSE.md | 4 -rw-rw-rw- 1 root root 3037 Apr 28 17:53 README.md | 4 drwxr-xr-x 2 root root 4096 Jun 7 22:13 '\github\workspace' \| 680 -rw-rw-rw- 1 root root 695256 Jun 7 16:17 'en-GB\article.js' | 16 -rw-rw-rw- 1 root root 13505 Jun 7 16:16 'en-GB\index.html' | 16 -rw-rw-rw- 1 root root 15466 Nov 24 2019 favicon.png | 16 -rw-rw-rw- 1 root root 13474 Jun 7 16:18 index.html | 8 -rw-rw-rw- 1 root root 6185 Nov 24 2019 index.template.html | 20 drwxr-xr-x 672 root root 20480 Jun 7 22:36 node_modules | 452 -rw-rw-rw- 1 root root 461855 Jan 5 20:07 package-lock.json | 4 -rw-rw-rw- 1 root root 3771 Jun 7 22:32 package.json | 4 -rw-rw-rw- 1 root root 1301 Nov 24 2019 'tools\aggregate-js-handlers.js' | 4 -rw-rw-rw- 1 root root 331 Nov 24 2019 'tools\buildmark.js' | 4 -rw-rw-rw- 1 root root 216 Nov 24 2019 'tools\clean-locales.js' | 4 -rw-rw-rw- 1 root root 810 Nov 24 2019 'tools\cleanup.js' | 4 -rw-rw-rw- 1 root root 732 Nov 24 2019 'tools\copy-default-locale.js' | 4 -rw-rw-rw- 1 root root 1284 Nov 24 2019 'tools\deploy.js' | 4 -rw-rw-rw- 1 root root 569 Nov 24 2019 'tools\find-locales.js' | 4 -rw-rw-rw- 1 root root 1569 Nov 24 2019 'tools\form-section-index-files.js' | 8 -rw-rw-rw- 1 root root 7794 Nov 24 2019 'tools\generate-page-content.js' | 12 -rw-rw-rw- 1 root root 11948 Nov 24 2019 'tools\lib\chunk.js' | 4 -rw-rw-rw- 1 root root 315 Nov 24 2019 'tools\lib\jsx-shim.js' | 8 -rw-rw-rw- 1 root root 4218 Nov 24 2019 'tools\tex-to-svg.js' | 4 -rw-rw-rw- 1 root root 1969 Nov 24 2019 'tools\watch-file-changes.js' | 4 -rw-rw-rw- 1 root root 1754 Nov 24 2019 webpack.config.js ``` So: cool, the `tools` dir exists and has `.js` files in it for Node to run. However, part two immediately fails: ``` | > bezierinfo@2.0.0 clean /github/workspace | > node ./tools/clean-locales.js | | internal/modules/cjs/loader.js:985 | throw err; | ^ | | Error: Cannot find module '/github/workspace/tools/clean-locales.js' | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15) | at Function.Module._load (internal/modules/cjs/loader.js:864:27) | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) | at internal/main/run_main_module.js:18:47 { | code: 'MODULE_NOT_FOUND', | requireStack: [] | } | npm ERR! code ELIFECYCLE | npm ERR! errno 1 | npm ERR! bezierinfo@2.0.0 clean: `node ./tools/clean-locales.js` | npm ERR! Exit status 1 ``` Why is that ` /github/workspace` getting appending? That's nowhere in my scripts, it's nowhere in the run, it should in fact be nowhere at all, yet something's putting it there. It shouldn't.
kerem 2026-03-01 21:41:02 +03:00
Author
Owner

@jsg2021 commented on GitHub (Jul 11, 2020):

/github/workspace is the current working directory. The relative path of ./tools/clean-locales.js resolves to /github/workspace/tools/clean-locales.js when presented as absolute.

<!-- gh-comment-id:657142142 --> @jsg2021 commented on GitHub (Jul 11, 2020): `/github/workspace` is the current working directory. The relative path of `./tools/clean-locales.js` resolves to `/github/workspace/tools/clean-locales.js` when presented as absolute.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 10, 2020):

Issue is stale and will be closed in 7 days unless there is new activity

<!-- gh-comment-id:689894277 --> @github-actions[bot] commented on GitHub (Sep 10, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@christopinka commented on GitHub (Sep 11, 2020):

Having similar problem. How is this resolved?

<!-- gh-comment-id:691169531 --> @christopinka commented on GitHub (Sep 11, 2020): Having similar problem. How is this resolved?
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2021):

Issue is stale and will be closed in 7 days unless there is new activity

<!-- gh-comment-id:756474908 --> @github-actions[bot] commented on GitHub (Jan 8, 2021): Issue is stale and will be closed in 7 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#189
No description provided.