mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #228] MODULE_NOT_FOUND during docker cp command #158
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#158
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pmatheson-greenphire on GitHub (May 8, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/228
Command I'm running
act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04Error 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@rdlf0 commented on GitHub (May 10, 2020):
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
dstpath you have to provide thepathkey in theactions/checkoutstep like this:I guess this should be better documented in order to save the others the time I had to spend on looking into it.
@pmatheson-greenphire commented on GitHub (May 11, 2020):
This doesn't seem like it would solve the problem - it just changes the destination directory of the initial checkout from
/github/workflow/to/github/workflow/${PATH}@rdlf0 commented on GitHub (May 11, 2020):
Yup! And that's how the path provided to
cpbecomes the one you suggested and theMODULE_NOT_FOUNDerror is gone. As far as I can understand your issue this seems to be the case. In my situation this was the solution.@tachuris commented on GitHub (May 16, 2020):
The problem is that
docker cpinterprets .gitignore (see current version), in particular the rule that should not ignore the *.js files in dist/:...as if it were a .dockerignore file, which doesn't support exception (
!) rules.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
actcould do beforedocker cp, @cplee ).See my fork here: https://github.com/GitTools/actions/compare/master...rstuven:patch-1
You can try it using the action
rstuven/actions/gitversion/setup@patch-1or replicating the change in a fork of your own.@ColinM9991 commented on GitHub (Jul 11, 2020):
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.
@tyler274 commented on GitHub (Aug 2, 2020):
similar issue over here too
@orihomie commented on GitHub (Dec 11, 2020):
@catthehacker commented on GitHub (Dec 11, 2020):
@orihomie read https://github.com/nektos/act#default-runners-are-intentionally-incomplete and https://github.com/nektos/act/issues/107
@thomas-schuster commented on GitHub (Dec 14, 2020):
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?
@tamj0rd2 commented on GitHub (Jan 1, 2021):
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
ciworkflow is defined in .github/workflows/ci.yml. Is that the thing the path is supposed to refer to, or is it something else? Can anyone post a working example of their path parameter and their folder structure?Here's the error output I'm getting:
@catthehacker commented on GitHub (Jan 2, 2021):
@tamj0rd2 your issue is not related to #228. You are using docker image that doesn't have
sudoincluded.@stephenfuqua commented on GitHub (Jan 21, 2021):
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
ubuntu-18.04:Note the slash confusion. As an alternative, I opened up a WSL2-based bash prompt and installed
actinside of the Linux subsystem. This resolved the slash problem. and I no longer get the module not found error.@catthehacker commented on GitHub (Jan 22, 2021):
@stephenfuqua that has been fixed in #461
@0-sv commented on GitHub (Aug 18, 2021):
@rstuven thanks for pointing this out, but I was able to add a
!tsconfig.jsonline to my.gitignore(just in the same repo as the workflow). For some reasontsconfig.jsonwasn't copied over. So, although you set me on the correct path, I'm not sure if it's still true.