npm config set -g msvs_version 2019 报错解决

  简介:前言今天安装opensumi时报错:报错信息:npm config set -g msvs […]

 

简介:前言今天安装opensumi时报错:报错信息:npm config set -g msvs_version 2019…

!!!opensumi 安装报错:node-pty: Command failed.  参考此方式:https://github.com/nodejs/node/issues/52554

前言

今天安装opensumi时报错:

报错信息:Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: E:workARTsrcfrontide-startup-lite-mainnode_modulesnode-pty
Output:
node:internal/child_process:414
throw errnoException(err, 'spawn');
^

Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:414:11)
at spawn (node:child_process:761:9)
at Object.<anonymous> (E:workARTsrcfrontide-startup-lite-mainnode_modulesnode-ptyscriptsinstall.js:11:20)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
at node:internal/main/run_main_module:28:49 {
errno: -4071,
code: 'EINVAL',

解决办法

安装python3 安装 vs2019

https://opensumi.com/zh/docs/develop/how-to-contribute#%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87

降级npm

npm install -g npm@^8

设置python和vs路径

npm config set -g msvs_version 2019
npm config set -g python "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.13_3.13.1008.0_x64__qbz5n2kfra8p0python.exe"

重新安装

phpdXeaJR

其他

还有一种解决是:https://github.com/nodejs/node/issues/52554

猜测改代码,但是代码又不是我写的 所以放弃了,最后降级了

 

版权声明
文章标题:npm config set -g msvs_version 2019 报错解决
文章链接:https://blog.chiyuba.com/qianduanjishu/597.html
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布,转载或引用请注明出处。
温馨提示:本文最后更新于 2025年7月12日,部分内容可能存在时效性,请注意甄别。

相关推荐

更多教程
ThinkPHP6模板中多次字符串替换使用方法 前端技术 ThinkPHP6模板中多次字符串替换使用方法

  简介:场景在tp6开发过程...

11 浏览
利用Vite从零到一创建一个React应用 前端技术 利用Vite从零到一创建一个React应用

  简介:安装vite脚手架n...

9 浏览
ssycms模板开发之模板常用的文章列表调用代码 UI相关 ssycms模板开发之模板常用的文章列表调用代码

最新文章 {tag:article id...

6 浏览

评论