Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Npm install newrelic


#1

Error: Failed to download https://download.newrelic.com/nodejs_agent/builds/_newrelic_native_metrics-2_4_0-native_metrics-57-win32-x64.gz: code 404


@newrelic/native-metrics does not install on Windows 10 from corrupt vcxproj
#2

@syed.sadiq, it looks like one of our packages did not get uploaded to our download directory at the same time we released that update. It appears that it’s there now. Could you try re-running the install and let us know if it goes through this time?


#3

Its gone again. Can someone please fix this?


#4

Hi @fcha, could you try using the following command?

NR_NATIVE_METRICS_NO_DOWNLOAD=true npm install

That should provide a workaround for the issue you’re experiencing. Let me know if that works.

@jlangdon


#5

Different error now

C:\Program Files\nodejs\node.exe C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build -j 4 /t:native_metrics
C:\repo\build.com\node-store\node_modules@newrelic\native-metrics\build\binding.sln.metaproj : error MSB4057: The target “/t:native_metrics” does not exist in the project. [C:\repo\build.com\node-store\node_modules@newrelic\native-metr ics\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “build” “-j” “4” “/t:native_metrics”

gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Error: Failed to execute install: Error: Failed to install module: Error: Failed to execute C:\Program Files\nodejs\node.exe C:\Users\xxxxxx\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build -j 4 /t:native_metrics: code 1; Error: Downloading is disabled.


#6

Similar error here.

Have set NR_NATIVE_METRICS_NO_DOWNLOAD=true

@newrelic/native-metrics@3.1.0 install C:\Users\XXXX\node_modules@newrelic\native-metrics
node ./lib/pre-build.js install native_metrics

C:\Program Files\nodejs\node.exe C:\Users\XXXX\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js clean configure
C:\Program Files\nodejs\node.exe C:\Users\XXXX\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build -j 4 /t:native_metrics
C:\Users\XXXX\node_modules@newrelic\native-metrics\build\binding.sln.metaproj : error MSB4057: The target “/t:native_metrics” does not exist in the project. [C:\Users\XXXX\node_modules@newrelic\native-metrics\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\XXXX\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\XXXX\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “build” “-j” “4” “/t:native_metrics”
gyp ERR! cwd C:\Users\XXXX\node_modules@newrelic\native-metrics
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Error: Failed to execute install: Error: Failed to install module: Error: Failed to execute C:\Program Files\nodejs\node.exe C:\Users\XXXX\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build -j 4 /t:native_metrics: code 1; Error: Failed to download https://download.newrelic.com/nodejs_agent/builds/_newrelic_native_metrics-3_1_0-native_metrics-57-win32-x64.gz: code 404

I’m not sure it’s related, I have Visual Studio Community 2017 installed - version 15.7.5

Did the whole

npm install --global --production windows-build-tools
npm install --global node-gyp

thingie as advised in @newrelic/native-metrics does not install on Windows 10 from corrupt vcxproj .
Not sure why I would need an up-to-date VS Code for an NPM package code (also advised in the other forum entry)

Also noticed, you have https://download.newrelic.com/nodejs_agent/builds/_newrelic_native_metrics-3_1_0-native_metrics-57-linux-x64.gz - but NOT the …win32-x64… on the download site.


#7

hey @Zoltan.Penzeli!

I’m going to open a support ticket for you so we can request some logs.

We can work on updating this post afterwards with a solution as it comes available.


#8

This is most likely due to the version of node-gyp. A change was introduced into node-gyp version 3.7.0 that prepends /t: to the build target on Windows machines. The ./lib/pre-build.js file that New Relic uses to bootstrap the build also prepends /t: to the target which results in a value of /t:/t:native_metrics being passed to MSBuild, which isn’t valid. You can fix this by installing an older version of node-gyp. Depending on how npm is set up on your machine you may also have to set the npm_config_node_gyp environment variable to the path of the older version of node-gyp so it gets picked up by the New Relic bootstrapper.


#9

Hi @Zoltan.Penzeli, just wondering if @jopric 's great suggestion was able to resolve this issue for you? :slight_smile:


#10

This is happening for us currently in development on Mac OS: 404 for https://download.newrelic.com/nodejs_agent/builds/_newrelic_native_metrics-3_1_0-native_metrics-57-darwin-x64.gz

Maybe you need to build this release again?


#11

Hi @jamesabc just wondering if you are still having this issue downloading the newest version?


#12

Yes, with both yarn and npm:

% uname -a
Darwin Jamess-MacBook-Pro-2.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
% yarn -v
1.9.4
% npm -v
5.6.0

% npm install @newrelic/native-metrics
Error: Failed to execute install: Error: Failed to install module: Error: Failed to execute /Users/james/.nvm/versions/node/v8.11.4/bin/node /Users/james/.nvm/versions/node/v8.11.4/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_1-native_metrics-57-darwin-x64.gz: code 404

#13

Ok thanks, just want to make sure your environment meets these requirements?

If so and would like to install the native metrics module, try running the following:

$npm install --loglevel=silly @newrelic/native-metrics --no-download

This command will have the agent build the binary rather than trying to download it.
If this fails, please let me know :slight_smile:


#14

Fails again. I don’t want to install xcode for this, Command Line Tools is sufficient for all my other development needs. We don’t even use this module in development. I think the sensible fix here is for us to specify it as an “optionalDependency” in package.json, maybe you could add that to your docs?


#15

As the requirements state Xcode is a prerequisite for installing this on Mac OS, but you’re right this is an optional module, it’s only used for Node VM Measurement and will not impact CPU metrics so you can specify as an optional dependancy :smiley:


#16

This fixed my issue. I was installing newrelic.
npm install --loglevel=silly newrelic --no-download


#17

Thanks for confirming you got a fix for this :smiley: @ashutosh2