I am upgrading a project to node-sass 4.9.4 because our previous version 3.13.1 is no longer supported and will result in a 404 if trying to load from github. The problem is whenever I try to do it, npm keeps attempting to load node-sass@3.13.1
I have tried to do npm install node-sass@4.9.4, npm install node-sass@4.9.3 and npm install node-sass@latest but it tries to load 3.13.1 every time resulting in the following error:
$ npm install node-sass@4.9.3
> node-sass@3.13.1 install D:\Projects\Repos\bluemill\mle-website\node_modules\gulp-sass\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_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.9.3 install D:\Projects\Repos\bluemill\mle-website\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-57_binding.node
Download complete
Binary saved to D:\Projects\Repos\bluemill\mle-website\node_modules\node-sass\vendor\win32-x64-57\binding.node
Caching binary to C:\Users\Tyler\AppData\Roaming\npm-cache\node-sass\4.9.3\win32-x64-57_binding.node
> node-sass@3.13.1 postinstall D:\Projects\Repos\bluemill\mle-website\node_modules\gulp-sass\node_modules\node-sass
> node scripts/build.js
Other things I've tried:
- Rebooting my computer
- Restarting docker
- Restarting git bash (I'm on windows)
- Running
npm cache clean --force - Going to the node-sass 4.9.4 npm-cache folder and manually downloading and installing binding
- Setting
"node-sass": "^4.9.0"in package.json for the correct folder - Setting
"node-sass": { "version": "4.9.4"...in package-lock.json - Checked package.json and package-lock.json for duplicate node-sass requirements that might be set to a different version (there are no others)
- Deleting the node_modules folder and running
npm installagain - Running
npm rebuild node-sass
No matter what I do, it always tries to load 3.13.1 first and results in a 404 error. I am completely at a loss as to what I can try next. I have double checked that I am running the commands in the same directory as the correct package.json at least 5 times.
The first time I got the error I fixed the package.json and it worked, then I got an error when doing docker-compose up so I reran npm install to confirm it had all the modules, since then it only loads 3.13.1 no matter what I do.