【发布时间】:2021-05-01 15:48:21
【问题描述】:
我正在尝试设置 Github Actions 来构建一个 docker 包,但我遇到了这个错误:
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/usr/src/app/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/usr/src/app/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/usr/src/app/node_modules/which/which.js:80:29)
gyp verb `which` failed at /usr/src/app/node_modules/which/which.js:89:16
gyp verb `which` failed at /usr/src/app/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /usr/src/app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:194:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (/usr/src/app/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/usr/src/app/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/usr/src/app/node_modules/which/which.js:80:29)
gyp verb `which` failed at /usr/src/app/node_modules/which/which.js:89:16
gyp verb `which` failed at /usr/src/app/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /usr/src/app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:194:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed at getNotFoundError (/usr/src/app/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/usr/src/app/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/usr/src/app/node_modules/which/which.js:80:29)
gyp verb `which` failed at /usr/src/app/node_modules/which/which.js:89:16
gyp verb `which` failed at /usr/src/app/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /usr/src/app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:194:21)
gyp verb `which` failed python Error: not found: python
gyp verb `which` failed at getNotFoundError (/usr/src/app/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/usr/src/app/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/usr/src/app/node_modules/which/which.js:80:29)
gyp verb `which` failed at /usr/src/app/node_modules/which/which.js:89:16
gyp verb `which` failed at /usr/src/app/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /usr/src/app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:194:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
工作流程步骤:
- name: Publish to Github Packages Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: SimpleAdminTeam/Website-Client/src
registry: docker.pkg.github.com
username: ${{ secrets.USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}
dockerfile: Dockerfile-prod
tags: latest
我正在使用最新的稳定 Node.JS、node-sass 和 node-gyp 版本。任何帮助都将不胜感激,因为我已经在网上爬行了一段时间,现在试图弄清楚。如果您需要更多信息,请告诉我。
【问题讨论】:
标签: node.js docker github-actions