我想在我的项目上安装newrelic但是我从de console接收:
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.在另一台机器上工作正常。我真的很感激,如果有人可以提供帮助,我已经尝试过来自newrelic discuss.newrelic/t/newrelic-native-metrics-does-not-install-on-windows-10- from-corrupt-vcxproj / 54625/3
in another machine works perfectly. i really would appreciate if some one could help with that, i already tried this from newrelic discuss.newrelic/t/newrelic-native-metrics-does-not-install-on-windows-10-from-corrupt-vcxproj/54625/3
推荐答案这很可能是由于node-gyp的版本。在node-gyp 版本3.7.0中引入了一个更改,它将 / t:添加到Windows机器上的构建目标。 New Relic用于引导构建的 ./ lib / pre-build.js 文件也包含 / t:到目标,导致值 / t:/ t:native_metrics 传递给MSBuild,这是无效的。您可以通过安装较旧版本的node-gyp来解决此问题。根据npm在您的机器上的设置方式,您可能还需要将 npm_config_node_gyp 环境变量设置为旧版node-gyp的路径,以便它被拾取New Relic bootstrapper。
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.
更多推荐
目标“/ t:native
发布评论