olefredrik / FoundationPress

FoundationPress is a WordPress starter theme based on Foundation 6 by Zurb
https://foundationpress.olefredrik.com
MIT License
2.71k stars 870 forks source link

Failed at node-sass@1.2.3 #231

Closed korndev closed 9 years ago

korndev commented 9 years ago

Hey there,

Been using FoundationPress on a few projects with no issue, but today, tried to setup a new project and getting an error with attempting to install node-sass. Here is the error:

npm ERR! Darwin 14.1.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE npm ERR! node-sass@1.2.3 postinstall: 'node scripts/build.js' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@1.2.3 postinstall script 'node scripts/build.js'. npm ERR! This is most likely a problem with the node-sass package, npm ERR! not with npm itself.

I attempted to update the package.json to use sass 2.0.1 and the install works, however, the grunt build fails with:

Running "sass:dist" (sass) task Fatal error: undefined is not a function

Running on OSX Yosemite, incase it matters.

Thanks for sharing FoundationPress with github. Been an awesome tool to use with WordPress to harness Foundation.

UPDATE: I've read that node-sass 1.2.3 is not compatible with node 0.12.0. I tried to roll back to node 0.11.9, but seem to get the same error:

npm ERR! node-sass@1.2.3 postinstall: 'node scripts/build.js' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@1.2.3 postinstall script.

npm ERR! System Darwin 14.1.0 npm ERR! command "node" "/usr/local/bin/npm" "install" npm ERR! cwd /Users/justin/Documents/Development/jobseekers/wp-content/themes/FoundationPress npm ERR! node -v v0.11.9 npm ERR! npm -v 1.3.15 npm ERR! code ELIFECYCLE

joshsmith01 commented 9 years ago

We all just went through this. Try the answers here. https://github.com/olefredrik/FoundationPress/issues/208

korndev commented 9 years ago

Thanks, Josh. Sorry I missed that previous ticket. Just be clear, looks like you need node 0.10.33. Installing 0.10.33 fixed the issue for me.

joshsmith01 commented 9 years ago

Hmm, not sure. I just folowed Ole's directions in the post and everything works now.

olefredrik commented 9 years ago

Hi guys. It's not ideal that grunt-sass is incompatible with the latest stable version of the node. But currently we have a choice to roll back node to v. 0.10.33 (as described in https://github.com/olefredrik/FoundationPress/issues/208) or ditch libsass and use the much slower ruby/compass alternative. I'll stick with grunt-sass/libsass and keep an extra eye on future updates. Glad you got it working :)

trompx commented 9 years ago

Hi,

I have problems too. I tried the following versions :

This config works on my host machine (windows 8.1) but I get the following error on my ubuntu 14.04 VM : "Error: libsass bindings not found. Try reinstalling node-sass?"

I manage to make this works on the ubuntu VM with the following versions :

Hope this helps!

nsberrow commented 9 years ago

It's not node or grunt, it's the scss code. Double check you haven't got an error there, drove me crazy but that's all it was, a syntax error.

phillbooth commented 9 years ago

you may have the wrong type of scss install try removing all gems installed and then re-installing node-sass as per http://foundation.zurb.com/docs/sass.html

sudo npm install -g bower grunt-cli

sudo gem install foundation

bundle;

npm i;

bower install;

then...

grunt build --force && grunt watch --force;