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

Missing python in 1.11 image w/ npm 7 #55

Open
coladarci opened this issue Jan 4, 2021 · 2 comments
Open

Missing python in 1.11 image w/ npm 7 #55

coladarci opened this issue Jan 4, 2021 · 2 comments

Comments

@coladarci
Copy link

After bumping to your new image for elixir 1.11, the npm install step is failing w/ an error that is largely over my head:

npm notice
npm notice New minor version of npm available! 7.0.8 -> 7.3.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.3.0>
npm notice Run `npm install -g npm@7.3.0` to update!
npm notice
npm ERR! code 1
npm ERR! path /build/assets/node_modules/deasync
npm ERR! command failed
npm ERR! command sh -c node ./build.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.1.0 | linux | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python2" can be used
npm ERR! gyp ERR! find Python - "python2" is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack     at PythonFinder.fail (/build/assets/node_modules/node-gyp/lib/find-python.js:302:47)
npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/build/assets/node_modules/node-gyp/lib/find-python.js:136:21)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/build/assets/node_modules/node-gyp/lib/find-python.js:179:16)
npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/build/assets/node_modules/node-gyp/lib/find-python.js:266:16)
npm ERR! gyp ERR! stack     at exithandler (node:child_process:316:5)
npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:328:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:327:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:275:12)
npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:467:16)
npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:80:21)
npm ERR! gyp ERR! System Linux 4.19.121-linuxkit
npm ERR! gyp ERR! command "/usr/local/bin/node" "/build/assets/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /build/assets/node_modules/deasync
npm ERR! gyp ERR! node -v v15.1.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! Build failed

I'm sort of at a loss..

@beardedeagle
Copy link
Owner

Apologies for seeing this late, I'll be cutting new releases very soon.

@beardedeagle
Copy link
Owner

It appears this is an issue with node-gyp requirements specifically. It's got dependencies on Python, make and g++, which weren't required in the image before. The interesting thing is that the package is said to support python3, but the python code will fail when using it. For now, I'll pin it to python2 until I can figure out how to make this work properly. I've got an image working locally that I'll push up.

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

2 participants