1.OpenSSL SSL_read: Connection was reset, errno 10054

错误描述:
npm ERR! Error while executing:
npm ERR! D:\Git\Git\cmd\git.EXE ls-remote -h -t https://github.com/nhn/raphael.git
npm ERR!
npm ERR! fatal: unable to access ‘https://github.com/nhn/raphael.git/’: OpenSSL SSL_read: Connection was reset, errno 10054
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\怦九\AppData\Roaming\npm-cache_logs\2021-10-28T10_24_42_415Z-debug.log

问题关键

OpenSSL SSL_read: Connection was reset, errno 10054

解决方案
执行指令:

git config --global http.sslVerify "false"

2. npm ERR! @1.0.0 dev: webpack-dev-server --progress --config build/webpack.dev.conf.js `

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test1028@1.0.0 dev: webpack-dev-server --progress --config build/webpack.dev.conf.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test1028@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

问题关键:
webpack 和 webpack-dev-server的版本不兼容

解决方案
npm uninstall webpack
npm uninstall webpack-dev-server

npm install webpack@3.8.1 --save-dev
npm install webpack-dev-server@2.9.1 --save-dev

经测试,3.8.1的webpack和2.9.1的webpack-dev-server是兼容的

3. npm ERR! the command again as root/Administrator

指令提示你需要管理员权限

解决方案有两个:
1、直接以管理员身份运行cmd窗口,然后执行npm install

这样有一个弊端:你需要每次都以管理员身份打开,运行npm install

2、删除C:\Users\用户名 下的.npmrc文件

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手