During development, we often find that node-sass cannot be downloaded normally, especially in some companies. When the internal and external networks are separated, node-sass cannot be downloaded directly. When encountering such a situation, you can handle it as follows:
1. Download the corresponding win32-x64-72_binding.node version and store it locally (for example: put it in "D:\node-sass\win32-x64-72_binding.node")
[Download address: https://github.com/sass/node-sass/releases ]
2. Find the .npmrc file in the C drive [location: "D:\User\user\.npmrc"] and configure the following code:
SASS_BINARY_PATH=D:\node-sass\win32-x64-72_binding.node
3. Use npm install node-sass to reinstall.
Notice! ! ! The Node version must correspond to the win32-x64-72_binding.node version . The specific corresponding relationships are as follows:
node version |
Supported node-sass versions |
Node Module【win-x64-72_bingding.node】 |
Node19 |
8.0+ |
111 |
Node18 |
8.0+ |
108 |
Node17 |
7.0+, |
102 |
Node16 |
6.0+ |
93 |
Node15 |
5.0+, |
88 |
Node14 |
4.14 |
83 |
Node13 |
4.13+, |
79 |
Node12 |
4.12+, |
72 |
Node11 |
4.10+, |
67 |
Node10 |
4.9+, |
64 |