目标“/ t:native_metrics”在项目中不存在 [英] The target "/t:native_metrics" does not exist in the project

查看:290
本文介绍了目标“/ t:native_metrics”在项目中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的项目上安装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 https://discuss.newrelic.com/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 https://discuss.newrelic.com/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_metrics”在项目中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆