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

created at 01-08-2022 views: 5

problem

npm run dev prompts the following error

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

Checked some documents and said that the version is too high.

In fact, the fundamental reason is that the configuration of the higher version has changed. Of course, it is not easy to change the configuration directly.

Simple solution:

  1. Uninstall: npm uninstall node-sass
  2. Installation: npm install node-sass@4.14.1
  3. Run: npm run dev
Please log in to leave a comment.