Solution 1: Use Taobao mirror source (online recommendation)

Set variable sass_binary_site to the address of taobao mirror. The sample

NPM I node - sass -- sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ / / can also set the system environment variables. Sample / / Linux, MAC SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ NPM install node - sass / / set under the window SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ && npm install node-sassCopy the code

Solution 2 switch node versions (my own method)

Because the project’s old code used the Node-sass installation dependency, the mismatch heat was found on the project’s Node version 10.18.0

I figured switching to Node version 10.18.0 should be enough to install Node-sass using NPM

So he started doing it

1. Install the Node version switching tool NVM

Download: github.com/coreybutler… (nvM-setup. zip) After installation, enter NVM -v to check whether the installation is successful

2. Install the specified version of Node and use it

Run NVM install 10.18.0

Use the specified node version

NVM use 10.18.0

3. Install Node-SCSS using NPM

Solution 3 Install it locally using the official installation method

Specific method: www.sass.hk/install/

Solution 4 Replace Node-sass with Dart-sass

// Install Dart-sass YARN add node-sass@yarn:dart-sass // or NPM install node-sass@npm: Dart-sass // Install SASS and Sas-Loader YARN after the installation is successful Add sass sas-loader // or NPM install sass sas-loaderCopy the code

If still have what don’t understand can private letter I oh!