package-lock.json 這個(gè)文件被刪了真可怕
npm install 有時(shí)會(huì)碰到連依賴都下不下來。
package-lock.json。
大多數(shù)人最終都會(huì)刪package-lock.json和運(yùn)行“npm install”。
有時(shí)會(huì)遇到依賴項(xiàng)的問題,找不到,或者安裝了錯(cuò)誤的版本。
看了兩篇文章 果斷轉(zhuǎn)用yarn (主要是不想有那么煩人的事情)
不要?jiǎng)h除 package-lock.json 只是為了運(yùn)行npm install并重新生成它
作者:wuwhs
原文:https://segmentfault.com/a/1190000039684460
另一篇是weixin_34132768
npm install 的報(bào)錯(cuò)信息文章來源:http://www.zghlxwxcb.cn/news/detail-537229.html
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: shopadmin@0.1.0
npm ERR! Found: eslint@5.0.0
npm ERR! node_modules/eslint
npm ERR! dev eslint@"5.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">=7.5.0" from @vue/cli-plugin-eslint@5.0.8
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR! dev @vue/cli-plugin-eslint@"~5.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See E:\node\node_cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! E:\node\node_cache\_logs\2022-08-18T08_18_44_560Z-debug-0.log
報(bào)錯(cuò) 可以使用 npm install --legacy-peer-deps 命令成功解決問題;
不行的話可以先請(qǐng)一下緩存 —> npm cache clean --force 在執(zhí)行npm install --legacy-peer-deps 這條命令
踩坑 勿噴,謝謝文章來源地址http://www.zghlxwxcb.cn/news/detail-537229.html
到了這里,關(guān)于npm ERR! code ERESOLVE Found: eslint@5.0.0 npm ERR! node_modules/eslint npm ERR! dev eslint@“5.0.0的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!