1. Error analysis:
First, the error code and information are:
A. Error code:
ERESOLVE could not resolve
B. The error message is displayed as:
Second, the problem analysis of the error:
A. The code to find the error is:
npm i [email protected]
B. Why is there an error?
Probably because of the version problem, because node.js
I node-sass
have no problem when installing and , and there is no problem when the previous project is [email protected]
installed ;
2. The solution process:
1. Method 1: Add a statement command after the command:--legacy-peer-deps
A. The command [email protected]
to the version is:
npm i [email protected] --legacy-peer-deps
B. The page display effect at this time is:
Second, method two, modify the version of npm;
A. npm
Check the version of:
B. At this time npm 版本为:8.6.0
, the reason for the error is very likely to be the problem of the npm version, and changing npm 6.0
to the version may also solve the problem (I haven’t practiced it myself, if you have practiced successfully, you can give me a drop, thank you very much!);
3. Summary:
First, where there is something wrong or inappropriate, please give me some pointers and exchanges!
Second, if you are interested, you can pay more attention to this column (Vue (Vue2+Vue3) interview must-have column):https://blog.csdn.net/weixin_43405300/category_11525646.html?spm=1001.2014.3001.5482