sass / node-sass

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

Can't install on node v0.11.13 and v0.11.14 OS X, but you can build it manually... #563

Closed naartjie closed 9 years ago

naartjie commented 9 years ago

I was trying to install node-sass using node v0.11.13 and v0.11.14 today on OS X, with npm v2.1.11. I couldn't get it to work, and I googled really hard for any solutions, but couldn't find any. I found a couple of bugs reported (eg #550 #490), and eventually info that only node v0.10.x is supported, so you should use that.

I really wanted to get it working I kept trying and eventually got it to build manually. So I though I'd share the steps here in case someone wanted to get node-sass running on v0.11.x:

Follow the rebuilding binaries steps from the readme:

git clone --recursive https://github.com/sass/node-sass.git
cd node-sass
git submodule update --init --recursive

Stop here, and comment this line out before continuing on with:

npm install

Then uncomment it again, and continue:

npm install -g node-gyp
node-gyp rebuild

That's it, you should now have a working ./bin/node-sass, which you can npm link to be globally available.

naartjie commented 9 years ago

BTW this is the first time I'm experiencing libsass first-hand, and I can't believe how blitz fast it is!!! :+1: :100: !!! Great work.

am11 commented 9 years ago

Hey @naartjie, thanks for the detailed issue report and the workaround steps. Those are good candidate of docs IMO. (PR is welcome) :+1:

Currently, node-js is supported with stable node.js version, viz v0.10.33. The reason being, couple of (npm) dependencies have issue with nightly builds of node.js (or vice-versa?). Well that's way its not a stable build I suppose. :)

As soon as they fix the issues, node-sass will brilliantly work with bleeding edge version of njs.

naartjie commented 9 years ago

Sure thing, it's done. Just didn't think I'd make it onto the front page news ;-)

analog-nico commented 9 years ago

+1 Worked perfectly. After cloning I checked out the latest tag. Just to be safe...

snostorm commented 9 years ago

FYI this now appears to be an issue for io.js as well.

snostorm commented 9 years ago

FYI updating nan and modifying a small number of lines in [src/binding.cpp]() is all it takes to get io.js 1.0.x support working.

Basically String::New becomes String::NewFromUtf8 which contains a reference to a new isolate scope.

I can PR a change to the binding.cpp, although I am not sure if would be merged given the insistence on sticking with node.js 10.x exclusively (even though the 11.x line itself is nearly 2 years old and is used daily by many developers -- regardless of how Joyent chooses to label that branch as "unstable".)

node-sass is an upstream dependency on a lot of other projects which are otherwise 0.11.x (and io.js) friendly. Could we have some reconsideration on this stance?

am11 commented 9 years ago

@snowstorm, lets not discuss this under a closed issue. We have https://github.com/sass/node-sass/issues/627 opened or you can start a separate thread.

although I am not sure if would be merged given the insistence on sticking with node.js 10.x

We review each PR thoroughly. If the proposed solution work across the board (Node.js v0.10.35+, io.js v1.0.0+), I don't see why would anyone vote against it.

snostorm commented 9 years ago

Thanks @am11, I'll move my efforts over there. I'm glad to know if the PR is solid and supports v0.10, (v0.11?), io.js v1.0, it is likely to get merged :)