node-sass installation issue
Asked Answered
I

10

18

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:

installation process

Incompliant answered 25/8, 2017 at 8:4 Comment(3)
Obviously. You get a 404 when you follow the url. Why would npm then magically find it?Blocking
@i-- perfectly? Like a perfect 404 you mean? Latest version available there is github.com/sass/node-sass/releases/download/v3.13.1/…. Not v57Blocking
@NicoVanBelle not that. I tried running the same command and it works for me without any 404.Upwind
S
16

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.

Starling answered 8/2, 2018 at 12:48 Comment(1)
I had to put the binding in my User/AppData/Roaming/npm-cache/node-sass/4.12.0 directory I also ended up using the latest version of node-sass(v5.0.0) since v4.12.0 didn't have a win32-x64-83_binding.nodeLab
B
10

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-.

Blocking answered 25/8, 2017 at 8:26 Comment(1)
I specified v4.5.3 and got it installed . Thank you !Incompliant
A
8

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

Above answered 6/5, 2019 at 6:14 Comment(0)
P
5

Depends on which node version you are using. Node-Sass currently supports only these versions:

Supported Node.js versions 0.10, 0.12, 1, 2, 3, 4, 5, 6 and 7.

If you happen to work on one of those versions, try to specify which version of node-sass you want:

$ npm install --save-dev [email protected]

your npm is trying to download node-sass version 3.31.1 which is does not exist on the releases page of https://github.com/sass/node-sass/releases

Playoff answered 25/8, 2017 at 8:11 Comment(1)
I specified the version as u said and it worked. Thank you!Incompliant
B
3

You have an error on your command:

$ npm install node-sass --save-dev-
                                 ^^^

Should be

$ npm install node-sass --save-dev

(without the last - on dev)

Also, it is giving you a WARNING because it wants to be installed globally.

See the official node-sass documentation.

And also, could be interesting for you to know the differences between --save and --save-dev.

Bouchier answered 25/8, 2017 at 8:13 Comment(0)
S
3

version mismatch with node could be the issue. To install the working node-sass version, you can use

npm uninstall node-sass
npm install [email protected]

remember to choose your version number based on the following table, and the node version you have, which you can check by the command node --version

node-sass compatibility table

You can find full info here

Sandman answered 11/7, 2021 at 16:27 Comment(0)
V
1

While searching for the solution, have checked the release versions of node-sass and found that "https://github.com/sass/node-sass/releases" the node file it was looking is committed in the latest release and not in the older version. After downloading the required file "win32-x64-64_binding.node" manually from the released version and placing it under C:\Users\Administrator\AppData\Roaming\npm-cache\node-sass\4.7.2 or simply by using npm install node-sass@latest works for me.

Vesica answered 12/6, 2018 at 16:54 Comment(0)
P
0

None of the above solutions worked for me, this is what I did:

Installed C++ build tools for Visual Studio

Then:

npm uninstall --save-dev gulp-sass
Pieper answered 17/1, 2019 at 6:40 Comment(0)
V
0

Under the same circumstances I tried to install the node-sass package. I got the error that it required different version. The culprit turned out to be the fact that I was installing not under client folder but in the main one. After that I installed the appropriate version for Node (for example 12 -> 4.12) based on the answer from Error: Node Sass version 5.0.0 is incompatible with ^4.0.0

Vinous answered 17/1, 2021 at 9:17 Comment(0)
N
0

Guy's I found the solution. Check your node version by typing in the terminal: "node -v" for example it showed you 13.2.1. Go to this website and check your node version with the suitable version of node-sass for example 4.13

https://www.npmjs.com/package/node-sass

Then type this code in your terminal: "npm install [email protected] --save-dev" If didn't work do this: "npm install sass" Then install it again: "npm install [email protected] --save-dev"

It worked for me perfectly

Nigel answered 15/6, 2024 at 1:21 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.