Python not available after recent update(?)
Hiya! I've been deploying via Railway for almost a year now - and it's been great!
Starting three days ago, all my builds are failing with the error message
Python is not set from command line or npm configuration
while building node-gyp.
I am deploying JS using yarn
.
Did a recent update to Railway change anything? Is the default image now more lightweight, meaning Python isn't included?
And if so, is there a way to do this while avoiding a custom Dockerfile?
I could try to guess the python location and set it as an environment variable, but that seems very brittle...
Thanks!
---
Project ID: 07fcde41-284c-48e1-83d0-a92b28b116fc
Full error:
Solution:Jump to solution
FIXED by removing 2 dependencies that were depneding on old versions of
node-gyp
(incompatible with Node 18)
Didn't end up needing the nixpacks.toml
Thanks a ton @Brody for pointing me in the right direction, though! Appreciated 🚀...16 Replies
Project ID:
07fcde41-284c-48e1-83d0-a92b28b116fc
python was never a part of a javascript deployment before
Just tried to redeploy that latest succeeding deployment - which also failed. So doesn't seem like it's a new dependency on my side
Oh, that's odd then
very, but yeah it can be added, add this to a nixpacks.toml file in your project
Thanks! Sorry if this is a dumb question, but should I include the
'...'
part?
Currently have no nixpacks.toml fileyes you should
Awesome thanks - will report back with result
its an array extension, if you left it out python38 would then be the only thing added during build, but we want to add python on to the packages that are added by default, like node, and yarn
Getting a new error now... seems like it's now missing
g++
?
updated
Thanks - still failing though...
Ahhh I see! Node was updated from 16_x to 18_x
Node 16 is EOL, so it makes sense
Which might trigger node-gyp to do a fresh build
Is there a place where I can see all the nixpack aliases for different packages? Or does it match apt-get or similar repo?
Perfect, thanks Brody! Will update this thread when I find a solution
send the build logs? https://bookmarklets.up.railway.app/log-downloader/
Solution
FIXED by removing 2 dependencies that were depneding on old versions of
node-gyp
(incompatible with Node 18)
Didn't end up needing the nixpacks.toml
Thanks a ton @Brody for pointing me in the right direction, though! Appreciated 🚀awsome glad you where able to solve it!
and you even came to the appropriate solution, mixing languages is not the best option