From f29b1f2523f5162fa42554870269160a4fb51419 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 12 Mar 2021 19:15:27 -0500 Subject: [PATCH] Add more context to MODULE_NOT_FOUND errors and how to fix it (#552) --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c1c2341..91899f7 100644 --- a/README.md +++ b/README.md @@ -114,16 +114,26 @@ It will save that information to `~/.actrc`, please refer to [Configuration](#co # Known Issues -MODULE_NOT_FOUND during `docker cp` command [#228](https://github.com/nektos/act/issues/228) +A `MODULE_NOT_FOUND` during `docker cp` command [#228](https://github.com/nektos/act/issues/228) can happen if you are relying on local changes that have not been pushed. This can get triggered if the action is using a path, like: + +```yaml + + - name: test action locally + uses: ./ +``` + +In this case, you _must_ use `actions/checkout@v2` with a path that _has the same name as your repository_. If your repository is called _my-action_, then your checkout step would look like: ```yaml steps: - name: Checkout uses: actions/checkout@v2 with: - path: "your-action-root-directory" + path: "my-action" ``` +If the `path:` value doesn't match the name of the repository, a `MODULE_NOT_FOUND` will be thrown. + # Runners GitHub Actions offers managed [virtual environments](https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners) for running workflows. In order for `act` to run your workflows locally, it must run a container for the runner defined in your workflow file. Here are the images that `act` uses for each runner type and size: