Home>Article>Web Front-end> How to solve vue node sass error report

How to solve vue node sass error report

藏色散人
藏色散人 Original
2022-12-29 14:57:41 2344browse

Vue node sass error solution: 1. Check the "node-sass" version referenced in the project; 2. Query the "node.js" version corresponding to "node-sass"; 3. Clear npm , and then re-execute "npm install" to install node.

How to solve vue node sass error report

#The operating environment of this tutorial: Windows 10 system, node-sass version 4.14.1, Dell G3 computer.

How to solve vue node sass error?

Vue node-sass installation error

Generally speaking, it is the node-sass and If the local node environment is inconsistent, first check the node-sass version referenced in the project, and then compare it with the node version in the local environment to make the appropriate choice, either modify the node-sass version in the project or modify the node version in the local environment.
1. How to check the local environment node version
Open the command line tool and enter

node -v

2. Check the node-sass version referenced in the project, find the package.json file and search for node-sass to query the current version. .

How to solve vue node sass error report
##Screenshot 2022-05-17 PM 1.42.46.png
I am here on 4.14. 1 version of node-sass.

3. Query the node.js version corresponding to node-sass.
https://github.com/sass/node-sass/releases?page=1

How to solve vue node sass error report
##Screenshot 2022-05-17 PM 1.47.44.png
You can see that the highest version of node.js supported by node-sass 4.14.1 is 14. If the local version is greater than version 14, you need to lower the local node version. For details, check out my other node.js version control
Use n to switch node.js version on Mac
. 4. If the versions are all corresponding, we first clear npm, and then npm install.
npm cache clean -f npm i
5. Okay, I wish you success! ! !

Recommended learning: "

node.js Video Tutorial

"

The above is the detailed content of How to solve vue node sass error report. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Is egg.js node? Next article:Is egg.js node?