code E404
1、可能是npm 源沒有該依賴包資源
解決:換 npm 源 重新下
(1、查看可使用的npm 源)
nrm ls
------------------結(jié)果
npm ---------- https://registry.npmjs.org/
yarn --------- https://registry.yarnpkg.com/
tencent ------ https://mirrors.cloud.tencent.com/npm/
cnpm --------- https://r.cnpmjs.org/
taobao ------- https://registry.npmmirror.com/
npmMirror ---- https://skimdb.npmjs.com/registry/
--------------------------
(2、切換 npm 源,一般cnpm 和 taobao源 用得多且速度快過npm源)
npm config set registry https://registry.npmmirror.com/
(3、檢查是否已切換 npm 源)
npm config get registry
-------------------(成功結(jié)果)
https://registry.npmmirror.com/
-------------------
(4、重新下依賴,為防止之前已有版本和當(dāng)前下的版本有沖突,后綴加上 --legacy-peer-deps 解決)
npm install --legacy-peer-deps
完成
code E451

報(bào)錯(cuò)信息顯示(reason:vabjs bad guy,steal env and delete files)
去npm 庫 https://www.npmjs.com/里查看該包的版本是否能使用

指定latest版本下載
npm install webpack@latest
2、查到這個(gè)依賴已經(jīng)被刪除了,頁面為404時(shí)

1、拿同事(如果 ta 的能正常運(yùn)行的話)的node_molules放入到項(xiàng)目中
2、清緩存
npm cache clean --force
3、運(yùn)行指令文章來源:http://www.zghlxwxcb.cn/news/detail-533596.html
npm run serve
ok文章來源地址http://www.zghlxwxcb.cn/news/detail-533596.html
到了這里,關(guān)于npm i 報(bào)錯(cuò) code E404 / code E451(reason:vabjs bad guy,steal env and delete files.)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!