-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MODULE_NOT_FOUND during docker cp
command
#228
Comments
I had some hard time with this, too, but after some digging through the code I found out that in order to get the correct steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: "your-action-root-directory" I guess this should be better documented in order to save the others the time I had to spend on looking into it. |
This doesn't seem like it would solve the problem - it just changes the destination directory of the initial checkout from |
Yup! And that's how the path provided to |
The problem is that
...as if it were a .dockerignore file, which doesn't support exception ( So if you check the contents of the copy destination, there is no *.js:
A workaround is removing the problematic .gitignore rules in a fork or just deleting .gitignore (which I think See my fork here: GitTools/actions@master...rstuven:patch-1 |
* Added documentation for module not found issue. * Linked the open issue #228.
I'm currently having this issue with the same described behaviour when it's working with actions for a .NET Core application. I am developing on a Windows environment and building on a Linux environment.
|
similar issue over here too [CI/Check ubuntu-latest (stable)-1 ] π³ docker cp src=act/actions-rs-toolchain@v1 dst=/actions\
| internal/modules/cjs/loader.js:628
| throw err;
| ^
|
| Error: Cannot find module '/github/workspace/\actions\actions-rs-toolchain@v1\dist\index.js'
| at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
| at Function.Module._load (internal/modules/cjs/loader.js:527:27)
| at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
| at internal/main/run_main_module.js:17:11 {
| code: 'MODULE_NOT_FOUND',
| requireStack: []
| }
[CI/Check ubuntu-latest (stable)-1 ] β Failure - actions-rs/toolchain@v1 |
|
I am currently stuck at the very same thing. I'd like to try your suggestion, but somehow I do not understand what "your-action-root-directory" would be. Could you exemplify which directory I need to put here? And would it be a relative or absolute path on my machine to get act working? |
I have a similar question. I'm not sure what "your-action-root-directory" is referring to, because I have no custom actions. Here's a repository I'm working with as an example: https://github.com/tamj0rd2/ts-quickfixes My Here's the error output I'm getting:
|
Another scenario to help others debug: running this tool in Windows (from Powershell), I received the following error message when I tried to run an action on Error: Cannot find module '/github/workspace/\actions\actions-setup-python@v2\dist\index.js' Note the slash confusion. As an alternative, I opened up a WSL2-based bash prompt and installed |
@stephenfuqua that has been fixed in #461 |
@rstuven thanks for pointing this out, but I was able to add a |
Command I'm running
act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04
Error output
it looks like the code from gittools-actions-gitversion-setup@v0.9.2 is copied to /actions/ in the container but the action javascript expects the original directory name to be in the path. So the cp should be
cp /home/user/.cache/act/gittools-actions-gitversion-setup@v0.9.2 /actions/gittools-actions-gitversion-setup@v0.9.2
The text was updated successfully, but these errors were encountered: