Today, when writing the Vue page, according to the tutorial, I want to install sass-loader and node-sass, but when running the project after installation, the following errors are reported:
Node Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0
The solution is as follows
Stop using node-sass
and replace it with sass
.
If you want to use SCSS or sass in your application, you need to do this:
First uninstall the previously installed node-sass
yarn remove node-sass
If NPM is used, then
npm uninstall node-sass
Then install sass
instead of node-sass
yarn add -D sass
perhaps
npm i -D sass
Then your SCSS/sass file will be compiled correctly.
Read More:
- [Solved] Vue Error: Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.
- Vue installs sass loader directly, and node sass reports an error
- [Solved] Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
- [Solved] Error: Node Sass does not yet support your current environment
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment:
- NPM run dev runs the Vue project and reports an error: Node Sass does not yet support your current environment
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment: OS X Unsupported archi
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment: Windows 64-bit with
- [Solved] This.getoptions is not a function when installing sass loader and less loader
- [Solved] node-xlsx Write excel Error: TypeError: n.indexOf is not a function
- node.js yarn Error: SyntaxError: Unexpected string [How to Solve]
- Vue Use scss Error: this.getOptions is not a function [How to Solve]
- [Solved] Syntax Error: TypeError: this.getOptions is not a function
- [Solved] Syntax Error: TypeError: this.getOptions is not a function
- Ts-node Error: return new TSError(diagnosticText, diagnosticCodes);
- [Solved] Module build failed: Error: Vue packages version mismatch
- [Solved] scss Error: TypeError: this.getOptions is not a function
- Using ts-node to Execute .ts files Error [Solved]
- [Solved] Node.js v17 npm run dev Error: opensslErrorStack