npm ERR! code ERESOLVEnpm ERR! ERESOLVE unable to resolve dependency tree

npm install --save-dev cross-env 报错

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.11.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^7.12.1" from [email protected]
npm ERR! node_modules/eslint-config-standard
npm ERR!   dev eslint-config-standard@"^16.0.3" 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 install --save-dev  compression-webpack-plugin 或者

npm install --save-dev  compression-webpack-plugin --legacy-peer-deps

你可能感兴趣的:(npm,node.js,前端)