1. Installing node-sass
When installing node-sass, the node scripts/install stage downloads a .node file from github.com, and network problems often cause this to fail.
You can add an .npmrc file inside the project to configure a proxy for the installation:
| |
Or install with cnpm:
| |
2. Installing node-gyp
node-gyp is the build tool used to compile C++ extensions for Nodejs. Here you can find detailed installation instructions for each system.
On Windows:
- Install node-gyp:
| |
- Configure the Python2.7 and VC ++ build Tools dependencies.
| |
During compilation and build, node-gyp automatically downloads the required dependencies from overseas servers.
If the download speed is too slow, you can also download the application package yourself. After installing it, configure things with the npm config set python python2.7 and npm config set msvs_version 2015 commands.
3. After switching the Nodejs version, the cache must be rebuilt
| |
