Erik Cunha
Erik Cunha

Reputation: 41

The target "/t:native_metrics" does not exist in the project

i want to install newrelic on my project but i'm receiving from de console:

node_modules\@newrelic\native-metrics\build\bind ing.sln.metaproj : error MSB4057: The target "/t:native_metrics" does not exist in the project.

in another machine works perfectly. i really would appreciate if some one could help with that, i already tried this from newrelic https://discuss.newrelic.com/t/newrelic-native-metrics-does-not-install-on-windows-10-from-corrupt-vcxproj/54625/3

Upvotes: 4

Views: 1642

Answers (1)

John Price
John Price

Reputation: 83

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.

Upvotes: 2

Related Questions