-
报错code 1
可能是node版本和插件版本不对应
比如node-sass(6.0.1),sass-load(^10.0.1),需要node版本为16
node-sass@^4.9.0 版本要求:支持 Node.js 版本范围:Node 10/12 (推荐)
sass-loader@^7.1.0 版本要求:支持 Node.js 版本:Node 8/10/12/14
解决方法:降低node版本或者插件版本
-
报错code 128
npm ERR! Error while executing:
npm ERR! D:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 20.205.243.166]: errno=Connection timed out
npm ERR!
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
这个错误是因为 npm 在安装依赖时尝试通过 git 协议(git://
)连接 GitHub 获取 eve
包失败导致的。以下是解决方案:
1.临时切换 git 协议为 https
git config --global url."https://github.com/".insteadOf git://github.com/
2.清理缓存并重试
npm cache clean --force
npm install
-
nvm安装报错
nvm install 12.22.12
// 1.找到nvm的安装目录
nvm root
//2.访问https://nodejs.org/en/download/releases,找到并下载所需版本node
//3.下载解压后,放入nvm安装目录下即可
//查看node已安装列表
nvm list
//使用指定版本node
nvm use 12