You need to enable JavaScript to run this app. 已安装含MSBuild的VS2019,运行node-gyp仍报find VS错误求解
优惠活动
大模型
产品
解决方案
定价
更多

已安装含MSBuild的VS2019,运行node-gyp仍报find VS错误求解

环境前置情况
  • 已安装Visual Studio 2019,且安装包含MSBuild组件
    enter image description here
问题触发过程

执行node-gyp configure --msvs_version=2019或node-gyp rebuild命令时,会抛出如下报错信息:

gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@14.9.0 | win32 | x64
gyp info find Python using Python version 3.7.9 found at "C:\ProgramData\Anaconda3\python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find 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
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail
gyp ERR! node -v v14.9.0
gyp ERR! node-gyp -v v7.1.2
待解决诉求

当前场景和过往公开渠道记录的node-gyp configure 报“gyp ERR! find VS”错误同类问题高度相似,但过往公开渠道给出的各类解决方案对当前环境均不生效,需要可落地的排查、解决方法。


内容的提问来源于stack exchange,提问作者Sepush

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.11.08 03:27:04