目标“/ t:native

编程入门 行业动态 更新时间:2024-10-15 16:25:25
本文介绍了目标“/ 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 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

本文发布于:2023-11-16 22:59:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1607847.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:目标   native

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!