Module build failed: Error: Node Sass version 7.0.1 is incompatible with ^4.0.0. Solution

 


Error message:

insert image description here

 

Solution:
Find the problem: Module build failed: Error: Node Sass version 7.0.1 is incompatible with ^4.0.0.

This is because the version of Sass is too high, so you can change the version to a lower version according to the prompt. Here I changed it to version 4.0.0.

Here's how to change the version:

1. First find the package.json file in the IDE
Here is the package.json file

 Here is the package.json file

2. Then open the file and find "sass-loader", just modify the version, here it is modified to 4.0.0:

insert image description here

 

3. In the (terminal) first enter: ctrl+c at the point yes to terminate the operation

insert image description here

 

4. In the (terminal) first enter: npm install If it fails, enter cnpm install

insert image description here

 

5. Finally run: npm run dev successfully

insert image description here

 

Guess you like

Origin blog.csdn.net/s_sos0/article/details/131606439