npm下载时报npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!npm ERR! While resolving:..错

npm下载时报npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!npm ERR! While resolving:..错_第1张图片

 问题:开启了eslint校验后,下任何包都报以上的错误

原因:依赖关系冲突,版本冲突

解决:强制下载

1.在后面加上--legacy peer-deps
npm i element-ui -S --legacy peer-deps

 npm下载时报npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!npm ERR! While resolving:..错_第2张图片

2.后面加上--force
npm install babel-plugin-component--force

 npm下载时报npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolvenpm ERR!npm ERR! While resolving:..错_第3张图片

 

你可能感兴趣的:(npm,前端,javascript)