When I try to install node-sass using npm, I get the following error message:
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node":"
The command I use is:
npm install node-sass --save-dev-
You can see more details in the screenshot below:
This problem happens because the version of node-sass that you have installed is no longer compatible with the version of node you are trying to run it with.
Warning: LibSass and Node Sass are deprecated. While they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass.
x This usually happens because your environment has changed since running `npm install`. Run `npm rebuild node-sass` to download the binding for your current environment. To make node-sass available in your source code, npm needs to build the package and create a binding for your environment.
After struggling , finally found exact solution. In node js software folder, node-sass\4.5.0 folder is still created in npm-cache folder. So I download win32-x64-48_binding.node manually, put it in C:\Users\Administrator\AppData\Roaming\npm-cache\node-sass\4.5.0 folder.
And run npm install command, issue resolved.
I see you are running node version 8.1.4. You can also check it using node --version
in the command prompt.
You'll have to use a version >= v4.5.3 instead because lower versions of node-sass are incompatible with node8. This issue has been reported on their GitHub issue page.
You either have to define using v4.5.3 instead or pass the the -g
parameter while installing it, which seems to fetch the latest version automagically.
when i used -g it worked properly and got the latest version
Also, as @javiergarval has pointed out, you have a typo. It should have been --save-dev
instead of --save-dev-.
My problem is, that I need an older node-sass
Binary, which is not available for the new node version I have. But the solution is, at least on Windows, pretty simple. Just install the windows build tools. With that, npm is able to build the binaries out of the source.
Long story short, this solved the problem for me:
npm install --global --production windows-build-tools
Thanks to the answer on this question: node-sass installation issue on windows 10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With