执行 npm install
产生如下错误代码:
npm ERR! exited with error code: 128
$ npm install
npm WARN deprecated runjs@4.4.2: This project has been renamed to 'tasksfile'. Install using 'npm install tasksfile' instead.
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated microcli@1.3.3: This project has been renamed to @pawelgalazka/cli . Install using @pawelgalazka/cli instead
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated microargs@1.1.2: This project has been renamed to @pawelgalazka/cli-args. Install using @pawelgalazka/cli-args instead
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! xxx: errno=No such file or directory
npm ERR!
npm ERR!
npm ERR! exited with error code: 128
产生错误的原因:
可能有些依赖使用ssh的方式已经不能下载,需要替换成https方式
解决方法:
git config --global url."https://".insteadOf git://
或者
npm cache clean --force
git config --global http.sslverify "false"
npm cache clear
然后 npm install
。