I am behind a corporate proxy, so my build can't download the node-sass-binaries
directly from github. For now I have a Nexus3 raw repository (hosted).
The biniary files are downloaded from https://github.com/sass/node-sass/releases/download/{version}/{artifact}
and I upload them manually to the repository. In the .npmrc
I reference my repository with node-sass-binary={path to repo}
and it works fine. But I don't want to manually download and upload the files every time a new one is needed.
Now I want to set up a proxy repository that gets the artifacts automatically (like it is working with maven central).
What have I tried? I have created an Raw (proxy)
repo and entered the download URL https://github.com/sass/node-sass/releases/download/
But this isn't working.
The error I get:
node-sass@4.11.0 install C:\Project\ng\src\node_modules\node-sass node scripts/install.js
Downloading binary from https://myserver/nexus/repository/node-sass-binary//v4.11.0/win32-x64-72_binding.node Cannot download "https://myserver/nexus/repository/node-sass-binary//v4.11.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.11.0 postinstall C:\Project\ng\src\node_modules\node-sass node scripts/build.js
In my opinion this error message makes sense because if I call https://github.com/sass/node-sass/releases/download/
directly in the browser I get a 404 message.
So am I using the wrong URL or do I miss something else? Is it even possible to do this? Thanks for your help.