-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Impossible to mirror the libsass binaries #775
Comments
Maybe we could use npmconf for this? |
The OP probably need what phantomJS does: provide the ability to mirror the CDN. We are half way through. I thought it would make no sense to provide same organisation as we have in our own setup, so I didn't provided the same naming scheme as we have in node-sass. Given this use-case, I am pretty convinced and we would augment the same name as our (or probably configurable format via package.json). All the abilities are available in Related: #743. |
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_DIST_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_DIST_SITE is set to http://myhost:8080/local/node-sass-bin then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.4/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_DIST_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_DIST_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.4/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0
I can confirm that this sounds exactly like what I need. On April 4, 2015 10:25:16 PM Marcin Cieślak notifications@github.com wrote:
|
👍 This is a blocker issue for us at LinkedIn. |
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0
@chriseppstein Our premium support customers are always a top priority for us, can you try applying pull request #835 and set |
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0
@saper Thank you for the quick turn-around! Hey, @winding-lines, does this look sufficient for our needs? |
Actually, @dosco is going to be looking into this :) |
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0 The URL can be also specified as the --sass-binary-site commandline option or in the package.json: "nodeSassConfig": { "binarySite": <url> } While here, fix operator precedence for --sass-binary-url.
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0 The URL can be also specified as the --sass-binary-site commandline option or in the package.json: "nodeSassConfig": { "binarySite": <url> } While here, fix operator precedence for --sass-binary-url.
@saper will try and get an update to you about the patch by tomorrow. |
Which timezone? :) |
@saper @chriseppstein I had a chance to test the patch locally against our repository and it works great. |
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0 The URL can be also specified as the --sass-binary-site commandline option or in the package.json: "nodeSassConfig": { "binarySite": <url> } Remove --sass-binary-url and friends.
Thanks, I just uploaded the hopefully final version of the patch. |
Catching up. @saper that patch looks reasonable for the time being. Please open PR. I'll aim to get it into 3.0.0. My only suggestion would be put the default url into the |
On Wed, 22 Apr 2015, Michael Mifsud wrote:
My only suggestion would be put the default url into the `package.json`.
Good idea, will update in #835.
What do you think about test refactoring?
|
Apologies I missed your PR. Let's move this discussion to #835. |
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0 The URL can be also specified as the --sass-binary-site commandline option or in the package.json: "nodeSassConfig": { "binarySite": <url> } Remove --sass-binary-url and friends. Also change priority and use package.json defaults last, after command line arguments and the environment.
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0 The URL can be also specified as the --sass-binary-site commandline option or in the package.json: "nodeSassConfig": { "binarySite": <url> } Remove --sass-binary-url and friends. Also change priority and use package.json defaults last, after command line arguments and the environment.
Add small fix for source maps
After having investigated the proxy issue, I found out an extra problem: Even when the proxy call is made to work, my corporate proxy does not allow downloading native executables (.so, .dll, etc..) from the internet. The binaries provided by node-sass are blocked by the proxy and prevent the proper installation of node-sass.
As a workaround for this kind of issues, my organisation has an internal server dedicated to hosting trusted binaries that can be accessed without going through the proxy. That sounded like a reasonable solution to my problem until I disovered how the path to the binary is resolved:
and
This means that if I want to override the location of the binary, I need to point to the exact location of the particular binary that works for each machine's platform/architecture/module version/node-sass version combination. This is currently pretty hard to do given the various environments that our build scripts must run on.
node-sass should provide an option, say
--sass-binary-mirror-url
, that allows me to build a dumb mirror of all the binaries and that tells the node-sass installer to perform its binary resolution algorithm using this URL as base (instead of the hardcodedhttps://github.com/sass/node-sass/releases/download/
)As a workaround, I guess I could copy both of these methods to my
gulpfile.js
and compute the binary URL there. However, I'm not sure how I could make node-sass pick up that url. Is it possible?The text was updated successfully, but these errors were encountered: