Add more context to MODULE_NOT_FOUND errors and how to fix it (#552)

This commit is contained in:
Alfredo Deza 2021-03-12 19:15:27 -05:00 committed by GitHub
parent 8de7b956b7
commit f29b1f2523
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: