看错误日志,发现node-gyp回去找python的配置 尝试过以下几种方案总算是稀里糊涂解决了: 以管理员身份运行,全局安装构建工具包 npm i -g windows-build-tools 以管理员身份运行,全局安装构建工具包 npm config get msvs_version npm config set msvs_version 2019 --global 安装Node的时候勾选“自动安装必要工具...
错误信息“gyp err! find vs msvs_version not set from command line or npm conf”表明 node-gyp 在尝试查找并配置 Visual Studio 版本时遇到了问题。node-gyp 是一个用于编译原生 Node.js 模块的跨平台工具,它依赖于 Microsoft Visual Studio 或 Visual C++ 构建工具来编译 C++ 代码。该错误通常意味着 node...
NPM设置 npm config set prefix "C:\Program Files\node-v10.19.0-win-x64\node_global" npm config set cache "C:\Program Files\node-v10.19.0-win-x64\node_cache" npm config set msvs_version 2019 --global npm config set registry http://registry.npm.taobao.org npm config set node_gyp "...
### 步骤 3:配置msvs_version参数 在一些情况下,你可能需要手动配置msvs_version参数,以便告诉npm使用的是哪个Visual Studio版本。 ```bash # 设置msvs_version参数为2019(根据你的实际情况调整版本号) npm config set msvs_version 2019 ``` ### 步骤 4:重新执行npm命令 最后,重新执行之前出现错误的npm命令...
稍微明悟,应该是我的版本没设置对,因为我确实python和vs都安装了,而我的vs版本是2019 image.png 所以我npm config set msvs_version 2019然后npm install socket.io,安装成功。 日记本 更多精彩内容,就在简书APP "小礼物走一走,来简书关注我" 赞赏支持还没有人赞赏,支持一下 ...
npm config gypgyp ERR!ERR! find VSfind VS msvs_version not set from command line or npm config VCINSTALLDIR not set, not running in VS Command Prompt gyp gypERR! ERR! find VSfind VS VCINSTALLDIR not set, not running in VS Command Prompt gyp checking VS2019 (16.2...
然后选择 C++生成工具,其他默认 然后在CMD中设置 npm config set msvs_version 2017 如果后面的版本号错误,就根据提示修改为对应的版本号,例如下面这张图,就需要修改为2019 3、提示:Python环境安装不上 注:那就自己下载一个Python安装,网上有很多安装教程,推荐使用下载.mis一键安装...
1、命令 npm config set registryhttps://registry.npm.taobao.org 2、验证命令 npm config get registry 如果返回https://registry.npm.taobao.org,说明镜像配置成功。 3、最后执行npm install picgo-plugin-gitee-uploader npm config set registry https://registry.npm.taobao.org ...
npm config set msvs_version 2017 如果后面的版本号错误,就根据提示修改为对应的版本号,例如下面这张图,就需要修改为2019 3、提示:Python环境安装不上 注:那就自己下载一个Python安装,网上有很多安装教程,推荐使用下载.mis一键安装 本文由mdnice多平台发布...
然后执行npm config set msvs_version 2022 的时候报错了,node-gyp `msvs_version`不是有效的npm选项 解决办法是直接编辑config文件,在里面加上这条配置 执行npm config edit命令,会自动打开config文件,在最后面加上 ;msvs_version=2022 具体是2022还是2017 或者是其他版本,根据你安装的版本来 ...