Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
64
rated 0 times [  69] [ 5]  / answers: 1 / hits: 6620  / 2 Years ago, tue, august 16, 2022, 12:00:00

I am trying to do npm install and I am getting the error in my application


System details:
macOS Monterey : version 12.5


chip Apple M1 pro


node version: 14.19.3


node-gyp version: 9.1.0


python version:3.8.9


> [email protected] install /Users/sanhp/client-access-portal/node_modules/snappy
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=14.19.3 runtime=node arch=arm64 libc= platform=darwin)
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy-sinksource.o
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy-stubs-internal.o
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy.o
LIBTOOL-STATIC Release/snappy.a
env: python: No such file or directory
make: *** [Release/snappy.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/sanhp/.nvm/versions/node/v14.19.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/sanhp/.nvm/versions/node/v14.19.3/bin/node" "/Users/sanhp/.nvm/versions/node/v14.19.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/sanhp/client-access-portal/node_modules/snappy
gyp ERR! node -v v14.19.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok


More From » node.js

 Answers
9

npm install is complaining that it cannot find python in the environment. To confirm that is the case run the following command


python --version

You should get a command not found exception. To resolve install python after which running the above command will tell you the version of python installed. Some versions of python have a slightly different binary name for example python3 so I recommend you install pyenv which can be used to manage multiple versions of python. Follow the instructions in the README to install pyenv and python. Once the previous command returns the python version you can then try 'npm install' again.


[#37] Thursday, July 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ignacio

Total Points: 467
Total Questions: 128
Total Answers: 79

Location: Luxembourg
Member since Tue, Mar 14, 2023
1 Year ago
ignacio questions
Fri, Jun 10, 22, 00:00, 2 Years ago
Fri, Jun 4, 21, 00:00, 3 Years ago
Fri, Apr 23, 21, 00:00, 3 Years ago
Wed, Jul 22, 20, 00:00, 4 Years ago
;