appmetrics icon indicating copy to clipboard operation
appmetrics copied to clipboard

Unable to install library from npm

Open derodriguez-dev opened this issue 3 years ago • 5 comments

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

System information

  • Linux ~ Ubuntu 20.04
  • GNU Make 4.2.1
  • GCC 9.3.0
  • Python 3.8.10 (I've more than one version of python, but I pointed the 3* version on my npm config).
  • Node v14.17.2
  • NPM 6.14.13

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: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

derodriguez-dev avatar Jul 17 '21 09:07 derodriguez-dev

Hi, has found a solution?

maos1111 avatar Sep 16 '21 18:09 maos1111

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

derodriguez-dev avatar Sep 17 '21 11:09 derodriguez-dev

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

akhil-karat avatar Mar 31 '22 01:03 akhil-karat

Same here, any clou why this happens?

Michael-Reich avatar May 12 '22 11:05 Michael-Reich

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

  • OS: Monterey 12.3
  • Node: 14
  • npm: 6.14.15

nutboltu avatar May 16 '22 01:05 nutboltu