R
Railway5mo ago
eddie

python not found

#10 19.42 npm ERR! code 1



#10 19.42 npm ERR! path /app/node_modules/ffi-napi

#10 19.42 npm ERR! command failed

#10 19.42 npm ERR! command sh -c node-gyp-build

#10 19.43 npm ERR! gyp info it worked if it ends with ok

#10 19.43 npm ERR! gyp info using node-gyp@9.4.0

#10 19.43 npm ERR! gyp info using node@18.18.2 | linux | x64



#10 19.43 npm ERR! gyp ERR! find Python

#10 19.43 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration

#10 19.43 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON

#10 19.43 npm ERR! gyp ERR! find Python checking if "python3" can be used
#10 19.42 npm ERR! code 1



#10 19.42 npm ERR! path /app/node_modules/ffi-napi

#10 19.42 npm ERR! command failed

#10 19.42 npm ERR! command sh -c node-gyp-build

#10 19.43 npm ERR! gyp info it worked if it ends with ok

#10 19.43 npm ERR! gyp info using node-gyp@9.4.0

#10 19.43 npm ERR! gyp info using node@18.18.2 | linux | x64



#10 19.43 npm ERR! gyp ERR! find Python

#10 19.43 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration

#10 19.43 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON

#10 19.43 npm ERR! gyp ERR! find Python checking if "python3" can be used
project: 7bd9394f-6a2f-4a94-b405-cdc7d5edd6c7 added a npm package now railway complains about python not found
Solution:
node-gyp needs gcc too
[phases.setup]
nixPkgs = ['...', 'python3', 'gcc']
[phases.setup]
nixPkgs = ['...', 'python3', 'gcc']
...
Jump to solution
7 Replies
Percy
Percy5mo ago
Project ID: 7bd9394f-6a2f-4a94-b405-cdc7d5edd6c7
Adam
Adam5mo ago
Some npm packages require python. Please add create a nixpacks.toml file or modify your current one with the following lines.
[phases.setup]
nixPkgs = ['...', 'python3']
[phases.setup]
nixPkgs = ['...', 'python3']
Put the nixpacks.toml in your root directory
eddie
eddie5mo ago
ok thank you it continued passed the python missing error but build crashed module ffi-napi
Solution
Brody
Brody5mo ago
node-gyp needs gcc too
[phases.setup]
nixPkgs = ['...', 'python3', 'gcc']
[phases.setup]
nixPkgs = ['...', 'python3', 'gcc']
eddie
eddie5mo ago
omg it worked thank you @Brody @Adam !! amazing support
Brody
Brody5mo ago
happy to help!
eddie
eddie5mo ago
would have never figured it out, thanks alot