I’m happy to help you troubleshoot this. To start off, I’d like to gather some more information.
I’m curious, did you receive an error related to this when trying to run
npm install newrelic --save?
If not, could you please provide some more details about how this came up for you?
Additionally, can you tell me more about your environment?
- What version of Node are you running?
- What version the New Relic Node Agent are you running?
- If you encountered this as an error on installation, are you installing on Windows?
I’m getting the same issue. I’m running npm v6.6.0 on a mac and the error is from installing native-metrics with the following command (with output):
➜ dam-ams git:(monitoring-spike) ✗ npm i @newrelic/native-metrics > @firstname.lastname@example.org install /Users/projects/ep/dam-ams/node_modules/@newrelic/native-metrics > node ./lib/pre-build.js install native_metrics > /usr/local/Cellar/node/11.4.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean configure gyp ERR! configure error gyp ERR! stack Error: Command failed: /usr/local/opt/python/libexec/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "<string>", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12) gyp ERR! stack at ChildProcess.emit (events.js:189:13) gyp ERR! stack at maybeClose (internal/child_process.js:978:16) gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:395:11) gyp ERR! stack at Socket.emit (events.js:189:13) gyp ERR! stack at Pipe._handle.close (net.js:613:12) gyp ERR! System Darwin 18.2.0 gyp ERR! command "/usr/local/Cellar/node/11.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "clean" "configure" gyp ERR! cwd /Users/projects/ep/dam-ams/node_modules/@newrelic/native-metrics gyp ERR! node -v v11.4.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Error: Failed to execute install: Error: Failed to install module: Error: Failed to execute /usr/local/Cellar/node/11.4.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean configure: code 1; Error: Failed to download https://download.newrelic.com/nodejs_agent/builds/_newrelic_native_metrics-3_1_2-native_metrics-67-darwin-x64.gz: code 404 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @email@example.com install: `node ./lib/pre-build.js install native_metrics` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @firstname.lastname@example.org install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
This same error came from running
npm install newrelic originally. I can see from following the link listed by @farseercarl that the resource is not found, as shown by the 404 in the output from my
npm install command.