首页 > 解决方案 > 在本地测试 Github 操作,没有这样的文件或目录

问题描述

我正在尝试使用 act 在本地测试具有特定分支(不是v1)的自定义 github 操作,但我收到关于没有此类文件或目录的错误。

我确保已将 node_modules 添加到我在 github 的分支中,但是当我尝试在本地运行操作时:

- uses: super-cool-action@nonv1-branch

run act : 
Run cool-action@nonv1-branch
git clone 'https://github.com/custom-action' # ref=nonv1-branch 
    docker cp src=/Users/user1/.cache/act/custom-action@nonv1-branch/ dst=/var/run/act/actions/custom-action@nonv1-branch/
    docker exec cmd=[mkdir -p /var/run/act/actions/custom-action@nonv1-branch/] user=
    Failure - custom-action@nonv1-branch
Error: open /Users/user1/.cache/act/custom-action@nonv1-branch/node_modules/.bin/acorn: no such file or directory

如果我打开./bin/acorn这就是我得到的:

../acorn/bin/acorn

如何解决这个问题?

标签: githubnpmnode-modulesgithub-actionsacorn

解决方案


推荐阅读