SteGriff

Blog

Next & Previous

Node Sass Release Download Not Found

I had a problem with installing and running the build task for our Vue project on my new machine. When running npm install, I had this error:

$ npm i

> node-sass@4.10.0 install C:\TFS\Intermediary\ST3\Src\PSL.Intermediary.WWW\resources\js\Vue\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

A screenshot of Node Sass releases on GitHub

As we’re behind a nasty corporate proxy, I suspected that it was to blame. After tweaking HTTP_PROXY environment variables and npmconfig, the problem persisted.

So, time to do a sanity check. I visited that URL from the error to see if it’s really there… and it was a GitHub 404 page. I was expecting to have to diagnose a certificate issue like this guy on SO, but no. No page!

When I went to the Releases page of the repo, I saw there’s no such thing as ‘win32-x64-72_binding.node’ because it turns out 72 is a NODE_MODULE_VERSION, and version 72 didn’t exist when node-sass 4.10.0 came out:

P.S. I just found out for the first time that NODE_MODULE_VERSION is a thing by Ducking it and then running node -p process.versions

A screenshot of my node process versions

My next question was “How do you find a Node version with the Node Module version you want?” So I Ducked around and hey, it turns out the Node release page has this info right up front.

So I downgraded Node from 12.9.0 to 11.15.0

On retrying node i, the package downloaded and installed.

Next time I ran node run watch, the build task succeeded!

The lesson: watch out for incompatibilities between new Node versions and old package versions!