RuntimeTools / appmetrics

Node Application Metrics provides a foundational infrastructure for collecting resource and performance monitoring data for Node.js-based applications.
https://developer.ibm.com/open/node-application-metrics/
Apache License 2.0
970 stars 125 forks source link

Unable to install library from npm #653

Open derodriguez-dev opened 3 years ago

derodriguez-dev commented 3 years ago

Hi, I got an error during the installation from npm (npm install --save appmetrics).

System information

Error stack trace

gyp: [Errno 2] No such file or directory: 'python' while executing command '['python', './generate_build_id.py']' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.8.0-59-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /myProjectNodeModulesPath/appmetrics
gyp ERR! node -v v14.17.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
maos1111 commented 2 years ago

Hi, has found a solution?

derodriguez-dev commented 2 years ago

No, I haven't found a solution. I'm still waiting for an answer!

akhil-karat commented 2 years ago

Same issue with Mac

gyp: [Errno 2] No such file or directory: 'python' while executing command '['python', './generate_build_id.py']' in binding.gyp while trying to load binding.gyp

OS: Monterey 12.3 Node: 14 npm: 6.14.15 node-gyp and xcode libs installed

Michael-Reich commented 2 years ago

Same here, any clou why this happens?

nutboltu commented 2 years ago

I had the same issue. For mac OS: Monterey 12.3, you need to install python 2 manually. I tried to install it using pyenv but didn't work. The workaround is to install it from the official download site:

https://www.python.org/downloads/release/python-2718/macOS 64-bit installer

It works for me.

System Information