Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Node-Gyp cant find a python executable #70

Closed
KonnorRogers opened this issue Feb 4, 2021 · 6 comments
Closed

Bug: Node-Gyp cant find a python executable #70

KonnorRogers opened this issue Feb 4, 2021 · 6 comments

Comments

@KonnorRogers
Copy link

KonnorRogers commented Feb 4, 2021

Currently receiving the following error:

Run reviewdog/action-eslint@v1
  with:
    eslint_flags: app/ spec/
    github_token: ***
    level: error
    reporter: github-pr-review
    filter_mode: added
    fail_on_error: false
    workdir: .
    tool_name: eslint
/usr/bin/docker run --name ff91191493591e12746255c1c34_b838aa --label 442333 --workdir /github/workspace --rm -e INPUT_ESLINT_FLAGS -e INPUT_GITHUB_TOKEN -e INPUT_LEVEL -e INPUT_REPORTER -e INPUT_FILTER_MODE -e INPUT_FAIL_ON_ERROR -e INPUT_REVIEWDOG_FLAGS -e INPUT_WORKDIR -e INPUT_TOOL_NAME -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/veue/veue":"/github/workspace" 442333:70569ff91191493591e12746255c1c34
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /github/workspace/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /github/workspace/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/usr/local/bin/node',
npm ERR! gyp verb cli   '/github/workspace/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@15.8.0 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:196:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:196:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:196:21)
npm ERR! gyp verb `which` failed  python Error: not found: python
npm ERR! gyp verb `which` failed     at getNotFoundError (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed     at F (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed     at E (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed     at /github/workspace/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:196:21) {
npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack     at PythonFinder.failNoPython (/github/workspace/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/github/workspace/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack     at F (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack     at E (/github/workspace/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack     at /github/workspace/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack     at /github/workspace/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack     at /github/workspace/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:196:21)
npm ERR! gyp ERR! System Linux 5.4.0-1039-azure
npm ERR! gyp ERR! command "/usr/local/bin/node" "/github/workspace/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /github/workspace/node_modules/node-sass
npm ERR! gyp ERR! node -v v15.8.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok 
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /github/home/.npm/_logs/2021-02-04T17_23_43_872Z-debug.log
/entrypoint.sh: line 12: /github/workspace/node_modules/.bin/eslint: not found
/entrypoint.sh: line 14: /github/workspace/node_modules/.bin/eslint: not found
reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token 

Im assuming that maybe Alpine no longer ships with Python2? This was previously working, Im not sure what the issue is. I did some investigate work here:

nodejs/node-gyp#1337

And tried to use the fix they suggested but got an error about not having permissions in GH-Actions. Was curious if there was a workaround for this.

@KonnorRogers
Copy link
Author

Im wondering if maybe the Dockerfile now needs apk add python-2 or if even using build-base would alleviate the problem?

@skaltenegger
Copy link

@ParamagicDev +1 receiving the same error since today

@eaierstuck
Copy link

eaierstuck commented Feb 5, 2021

I am seeing the same error. I was able to get around it by forking this repo and adding apk add python2 to the Dockerfile.

eaierstuck added a commit to commonlit/action-eslint that referenced this issue Feb 5, 2021
This is a known issue in reviewdog/action-eslint: reviewdog#70
eaierstuck added a commit to commonlit/action-eslint that referenced this issue Feb 5, 2021
This is a known issue in reviewdog/action-eslint: reviewdog#70
geoffharcourt pushed a commit to commonlit/action-eslint that referenced this issue Feb 6, 2021
This is a known issue in reviewdog/action-eslint: reviewdog#70
geoffharcourt added a commit to commonlit/action-stylelint that referenced this issue Feb 6, 2021
Similar to reviewdog/action-eslint#70, this
action fails because `node:current-alpine` has drifted and Python 2 is
no longer available. This change adds it to the install so we can run
the action again.
@haya14busa
Copy link
Member

It should be fixed by migrating to composite run action now. #72

@KonnorRogers
Copy link
Author

Confirmed. Fixed with the new update!

@haya14busa
Copy link
Member

Thank you for the confirmation!

geoffharcourt pushed a commit to commonlit/action-eslint that referenced this issue May 8, 2021
This is a known issue in reviewdog/action-eslint: reviewdog#70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants