如何修复类似&gyp错误的node.js错误!当我启动Nuxt.js项目时,发现包括使用C++&Q;工作负载进行桌面开发的VS。 [英] How to fix node.js error like "gyp ERR! find VS including the "Desktop development with C++" workload." when I launch Nuxt.js project
本文介绍了如何修复类似&gyp错误的node.js错误!当我启动Nuxt.js项目时,发现包括使用C++&Q;工作负载进行桌面开发的VS。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
我认为这个错误消息取决于node.js。 因此,我遵循这些错误消息,在我的Windows PC上使用Visual Studio Installer用C++安装了&Visual Studio&。 但还是出现了相同的错误。
我尝试在管理的PowerShell中使用&windows-Build-Tools命令。 命令就是这样的。
npm install --global --production windows-build-tools
但还是发生了相同的错误。 我认为节点版本可能较高,因此需要将节点版本&14.15.1&q;降至&q;14.10.1&q;。 但永远不会解决我的问题。
我几乎放弃了,但nuxt.js安装正确。 我得把它修好。 我找了很多次,但都没能修好。 请问有没有人给我提建议?请......推荐答案
我关注this pages. 首先,我将binding.gyp文件放在";C:usersyour用户名中,如下所示。
{
"targets": [{
"target_name": "binding",
"sources": [ "binding.vcxproj" ]
}]
}
我的代码&资源&绑定到";vs++C";。 在Windows命令提示符下运行命令↓
$ node-gyp configure
↓
$ node-gyp configure --msvs_version=2019※I already installed vs_version=2019
↓
$ node-gyp build
就是这样!将c++与node.js一起传递非常简单。
这篇关于如何修复类似&gyp错误的node.js错误!当我启动Nuxt.js项目时,发现包括使用C++&Q;工作负载进行桌面开发的VS。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文