npm install 版本太高导致的错误,用命令行回退版本
Posted 跛豪丶
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了npm install 版本太高导致的错误,用命令行回退版本相关的知识,希望对你有一定的参考价值。
npm install npm@6.14.10 -g
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: @babel/core@7.0.0 npm ERR! node_modules/@babel/core npm ERR! dev @babel/core@"7.0.0" from the root project npm ERR! peer @babel/core@"^7.0.0-0" from @babel/register@7.0.0 npm ERR! node_modules/@babel/register npm ERR! dev @babel/register@"7.0.0" from the root project npm ERR! 61 more (@vue/cli-plugin-babel, babel-core, babel-loader, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @babel/core@"^7.4.0-0" from @babel/helper-define-polyfill-provider@0.2.3 npm ERR! node_modules/babel-plugin-polyfill-corejs2/node_modules/@babel/helper-define-polyfill-provider npm ERR! @babel/helper-define-polyfill-provider@"^0.2.2" from babel-plugin-polyfill-corejs2@0.2.2 npm ERR! node_modules/babel-plugin-polyfill-corejs2 npm ERR! babel-plugin-polyfill-corejs2@"^0.2.2" from @babel/plugin-transform-runtime@7.14.5 npm ERR! node_modules/@babel/plugin-transform-runtime npm ERR! @babel/plugin-transform-runtime@"^7.4.0" from @vue/babel-preset-app@3.12.1 npm ERR! node_modules/@vue/babel-preset-app 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 C:\\Users\\Administrator\\AppData\\Local\\npm-cache\\eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! C:\\Users\\Administrator\\AppData\\Local\\npm-cache\\_logs\\2021-06-16T07_39_31_283Z-debug.log
以上是关于npm install 版本太高导致的错误,用命令行回退版本的主要内容,如果未能解决你的问题,请参考以下文章
npm install mongoose 导致 gyp 和 kerberos 错误(未找到 gssapi/gssapi.h 文件)
错误:npm install -g @angular/cli