npm install error HTTP error 404 Not Found while using gulp-sass or node-sass@4.10.0 or @4.11.0 with NodeJS 12.x and npm@6.13.6 or latest

January 29, 2020

This article is for everybody that might run into issue like I did while using latest gulp-sass with NodeJS 12.x LTS.

The problem :

In a nutshell, the problem is, if you directly or indirectly (via npm-shrinkwrap.json) reference node-sass@4.10.0 or 4.11.0, you will get error like this :

npm i node-sass@4.10.0
node-sass@4.10.0 install c:\Users\dusan.rostar\Downloads\q\node_modules\node-sass
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.10.0/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.10.0/win32-x64-72_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
node-sass@4.10.0 postinstall c:\Users\dusan.rostar\Downloads\q\node_modules\node-sass
node scripts/build.js
Building: C:\Program Files\nodejs\node.exe c:\Users\dusan.rostar\Downloads\q\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok

Repro steps are simple, type npm i node-sass@4.10.0 or npm i node-sass@4.11.0 under NodeJS 12.x and you will see the same result.

The solution :

Looking at description of how to install on this link : https://www.npmjs.com/package/gulp-sass you will see this default command to install the package :

npm install node-sass gulp-sass --save-dev

It might happen, that either due to a different version of npm on different dev machines, or due to a slightly different version of package-lock/ npm-shrinkwrap file, npm install might try to download a version that will just have a problem and will throw an exception at you.

So pls, check if in your dependencies in your package.json you have node-sass directly listed, because you should.

Versions that will match your NodeJS version : https://github.com/sass/node-sass. min. node js for node-sass

NodeJS Minimum node-sass version Node Module
Node 13 4.13+ 79
Node 12 4.12+ 72
Node 11 4.10+ 67
Node 10 4.9+ 64
Node 8 4.5.3+ 57

Hope this helps.


Profile picture

Written by Dušan Roštár - the "mr edge case" guy
my twitter : rostacik, my linkedin : rostar, drop me an email : here