-
Notifications
You must be signed in to change notification settings - Fork 370
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
12.1.0 errors with Python is not set from command line or npm configuration
#2552
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Python is not set from command line or npm configuration
Hi, I had a similar error with the same version of firebase admin and also on ARM. I changed my node version to 20.13 and updated my docker file by adding: |
This should also be related to #2534 |
I am seeing the same issue with firebase-admin v12.1.1 + farmhash v3.3.1 |
Experiencing same here :/ |
@lahirumaramba FYI, should reopen this issue |
Hey folks, we will look into a better fix for this. In the meantime, are you able to add python to your docker image (or #2552 (comment)) to and see if that resolves the issue? Also, see: lovell/farmhash#48 |
For others facing the same issue, it would help us if you can share more information on your environment and the errors you are seeing. |
Here is the exact error: /var/server # npm ci
npm error code 1
npm error path /var/server/node_modules/farmhash
npm error command failed
npm error command sh -c prebuild-install || node-gyp rebuild
npm error prebuild-install warn install No prebuilt binaries found (target=3 runtime=napi arch=arm64 libc=musl platform=linux)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@18.20.3 | linux | arm64
npm error gyp ERR! find Python
npm error gyp ERR! find Python Python is not set from command line or npm configuration
npm error gyp ERR! find Python Python is not set from environment variable PYTHON
npm error gyp ERR! find Python checking if "python3" can be used
npm error gyp ERR! find Python - executable path is ""
npm error gyp ERR! find Python - "" could not be run
npm error gyp ERR! find Python checking if "python" can be used
npm error gyp ERR! find Python - executable path is ""
npm error gyp ERR! find Python - "" could not be run
npm error gyp ERR! find Python
npm error gyp ERR! find Python **********************************************************
npm error gyp ERR! find Python You need to install the latest version of Python.
npm error gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm error gyp ERR! find Python you can try one of the following options:
npm error gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm error gyp ERR! find Python (accepted by both node-gyp and npm)
npm error gyp ERR! find Python - Set the environment variable PYTHON
npm error gyp ERR! find Python - Set the npm configuration variable python:
npm error gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
npm error gyp ERR! find Python For more information consult the documentation at:
npm error gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm error gyp ERR! find Python **********************************************************
npm error gyp ERR! find Python
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Could not find any Python installation to use
npm error gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:306:11)
npm error gyp ERR! stack at PythonFinder.findPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:164:17)
npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm error gyp ERR! stack at async configure (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:27:18)
npm error gyp ERR! stack at async run (/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
npm error gyp ERR! System Linux 6.1.0-13-arm64
npm error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /var/server/node_modules/farmhash
npm error gyp ERR! node -v v18.20.3
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok Running inside a Edit: Tried to update the server to ** Edit 2:** Tried |
Thanks @lhermann for the detailed response! Would adding How many of y'all facing this issue use the remote config API? I am wondering if we should make |
Getting a similar error using the dockerfile here: https://github.com/sspenst/thinky.gg/blob/main/Dockerfile.dev
Optional dependency could be a possible solution, we are currently only using the messaging API. |
Indeed same issue for me on 12.1.1 |
@lahirumaramba my team isn't using the remote config api so that solution seems appealing (at least in our case). This issue also occurs when using the Thank you for looking into all of this, I appreciate it :) |
This issue will sometimes resolve if the platform of the container is set to Setting the platform to amd64 allows for the prebuilt binary of |
If making Thanks for looking into this! |
Thanks for the additional context folks! We are also looking into switching to an alternative dependency https://www.npmjs.com/package/farmhash-modern that does not require |
Do we have an update on this? I am seeing lots of merges on this, but still facing the issue. I have tried almost everything, installing python, adding PATH, node-gyp build with python. but nothing seems to work. The critical problem on my end is that my setup is using firebase-admin@9.6.0 for sending multi-cast messages for push notifications. Now upgrading it to 12 directly is a problem. Can anyone tell of a safe version, where I can shift without much hassle. Any help would be appreciated. |
If you are experiencing issues installing firebase-admin, you can try downgrading to Environment: OS: Windows, macOS (Linux might work too) Reason: |
Hey folks, we replaced |
works well on docker build with bun:1.1.13-alpine |
Hi @lahirumaramba , |
[READ] Step 1: Are you in the right place?
template.
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Getting error when building on docker on Mac
FROM node:20-alpine AS base
https://github.com/sspenst/thinky.gg/pull/1101/files
Works fine on 12.0.0.
Error is below:
The text was updated successfully, but these errors were encountered: