-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Cache binaries (to use node-sass offline with npm 3.9.0) #1554
Comments
We have multiple ways to support offline binaries documented in the readme - https://github.com/sass/node-sass#binary-configuration-parameters |
As fast as you closed this ticket, I think you didn't even read it. :( |
I was able to close this quickly because it has come up multiple times. I suggest setting up an internal mirror of the binaries so you have all the versions available locally within your firewall. It's the most robust solution and is how most of our enterprise users work around your issue. I understand what you're asking for but it would complicate what is already a complicated install process. |
Please take at least a small look at the install script of phantomJS. That doesn't look to complicated to me to be integrated into your install script. |
Hi, |
I'm sorry that's not an option for you. There are two options, setup a local http mirror, or a local filesystem mirror. The later is exactly the same as the solution suggested except that it's manual. |
Do you think you could document how to setup this cache for CircleCI/TravisCI? I know those aren't your focus, but spending 2 minutes per build building node-sass is pretty gruesome. You'd be doing the world a favor in terms of reducing the amount of CO2 produced generating the electricity to build node-sass thousands of times daily on CI platforms. Go green! Make node-sass eco-friendly! Help the planet! |
You should never have to build binaries. We put in a lot of work to make
sure pre-built binaries are publicly available.
On 23 Nov. 2017 5:00 pm, "politician" <[email protected]> wrote:
Do you think you could document how to setup this cache for
CircleCI/TravisCI? I know those aren't your focus, but spending 2 minutes
per build building node-sass is pretty gruesome.
You'd be doing the world a favor in terms of reducing the amount of CO2
produced building node-sass on CI platforms around the planet. Help the
planet!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1554 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWA20Pi1FZqaUrGwdgHGmHL-uvCkdks5s5QnngaJpZM4IhVy0>
.
|
@xzyfer I can never pull a prebuilt binary. Currently I'm getting:
edit: I wish the error message suggested checking version compatibility!! |
You've updated a major version of Node as soon as it was released. You
should expect some pain.
With that said you just need to update to the latest node-sass.
…On Thu., 26 Apr. 2018, 8:39 pm Michał Łępicki, ***@***.***> wrote:
@xzyfer <https://github.com/xzyfer> I can never pull a prebuilt binary.
Currently I'm getting:
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/linux-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.3/linux-x64-64_binding.node":
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1554 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWFr4PLzq3ru_UTHQBY5LqWci32Coks5tsaPTgaJpZM4IhVy0>
.
|
Hi, I just updated npm to 3.9.0 and using
npm install --cache-min=Infinity
which now works like an offline mode, but I got a problem with node-sass.Our setup:
We have a huge java/maven based workspace with some frontend stuff. We use the frontend-maven-plugin to call node/npm and grunt. This worksapce is build on Linux, MacOSX and Windows. For the frontend we use grunt-sass, which based on node-sass. Every
mvn clean install
will delete thenode_modules
folder and redownload all dependencies needed. This is important for our CI, because its the same way our customer are using the workspace. This works nice as long as you are online.Problem:
Some of our consultants and customers want/need to work offline. We couldn't support it yet, because of the problems with the npm cache. Since release 3.9.0 fixed this problem, it works offline with all our modules (if you at least build it once online = cached), but not with node-sass.
Possible Solution:
Here is an extract of the npm log to show how phantomjs/node-sass are doing it:
phantomJS
node-sass:
So it would be a very cool feature, if node-sass could support cached/temp binaries to save bandwidth and to support an offline mode! Thx.
The text was updated successfully, but these errors were encountered: