sass / node-sass

:rainbow: Node.js bindings to libsass
https://npmjs.org/package/node-sass
MIT License
8.51k stars 1.32k forks source link

NPM install fails with ECONNREFUSED #639

Closed Turbo87 closed 9 years ago

Turbo87 commented 9 years ago

when I try to install this package via NPM on OSX the install.js fails to download the binding.node file:

npm info it worked if it ends with ok
npm info using npm@2.1.18
npm info using node@v0.10.35
npm info preinstall node-sass@2.0.0-beta
npm info build /Users/tbn/Code/viessmann-grisu/node_modules/node-sass
npm info linkStuff node-sass@2.0.0-beta
npm info install node-sass@2.0.0-beta

> node-sass@2.0.0-beta install /Users/tbn/Code/viessmann-grisu/node_modules/node-sass
> node scripts/install.js

tunneling socket could not be established, cause=connect ECONNREFUSED
tunneling socket could not be established, cause=connect ECONNREFUSED
fs: missing callback Error: ENOENT, unlink '/Users/tbn/Code/viessmann-grisu/node_modules/node-sass/vendor/darwin-x64/binding.node'
npm info postinstall node-sass@2.0.0-beta

> node-sass@2.0.0-beta postinstall /Users/tbn/Code/viessmann-grisu/node_modules/node-sass
> node scripts/build.js

npm info prepublish node-sass@2.0.0-beta
npm info ok

the requested file is https://raw.githubusercontent.com/sass/node-sass-binaries/v2.0.0-beta/darwin-x64/binding.node and that does seem to exist. I have no idea why this doesn't seem to work properly.

Also once the download fails the exists() method in install.js will return true even though the file doesn't exist because it only checks for the existance of the folder, but not the binding file.

Turbo87 commented 9 years ago

it seems that https://github.com/sass/node-sass/blob/v2.0.0-beta/scripts/build.js#L122 is/was also part of the problem since it did not build the binary from scratch after the download failed, but it looks like that issue has been fixed already on the master branch

Turbo87 commented 9 years ago

https://github.com/sass/node-sass/commit/7ef08f45967d10745e9f36b84a1c1a3ff7021625 is probably part of the solution too. I would be great though if you could release another beta that includes this fix. Unfortunately https://github.com/dlmanning/gulp-sass already depends on the beta1 and fails to install and work due to this bug.

kaupok commented 9 years ago

Also getting an error while trying to install on FreeBSD 8.4:

npm install node-sass
|
> node-sass@2.0.0-beta install /home/[some path]/node_modules/node-sass
> node scripts/install.js

Can not download file from https://raw.githubusercontent.com/sass/node-sass-binaries/v2.0.0-beta/freebsd-x64/binding.node

> node-sass@2.0.0-beta postinstall /home/[some path]/node_modules/node-sass
> node scripts/build.js
am11 commented 9 years ago

@kaupok https://github.com/sass/node-sass/milestones/ (v2.1 is our next milestone)

am11 commented 9 years ago

@Turbo87, see https://github.com/sass/node-sass/issues/602. We are working towards the 2.0.0 stable release.

As you mentioned, this issue is fixed. Lets follow the progress on vNext at #602.

Turbo87 commented 9 years ago

@am11 thanks for the reply. are you planning to release another beta version any time soon?

am11 commented 9 years ago

@Turbo87, there would not be the second beta. In fact, v2.0.0 stable is ready to launch. We have one showstopper: Linux binaries which are compatible with older CentOS 5, which many node-sass users are using on their hosting (unfortunately). If we do not care about that and release it anyway, it will blowback badly.

We are still gauging our options to either drop support and have a solid stance on minimum GLIBC/libstdc++ requirement. Meanwhile, we are waiting for some build system expert to remedy this situation for us (by providing a permanent fix).