解决(gyp、python等问题):gyp ERR! find VS msvs_version not set from command line or npm config
2024-08-08缺少很多node.js相关的开发工具和依赖,比如python、Visual Studio、gyp等等。gyp ERR! find VS msvs_version not set from command line or npm configgyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Promptgyp ERR! find VS could not use PowerShell to find Visual Studio_gyp ERR! find vs
下载node-gyp依赖包报错:gyp ERR! find VS msvs_version not set from command line or npm config
2024-05-12然后执行npm config set msvs_version 2022 的时候报错了,node-gyp `msvs_version`不是有效的npm选项。就是有一点需要注意,我这里安装vs的时候,可用里面没有vs社区版2017,只有2022,只能安装了2022。具体是2022还是2017 或者是其他版本,根据你安装的版本来。解决办法是直接编辑config文件,在里面加上这条配置。再去执行npm install,可以成功安装依赖了。_gyp ERR! find vs