Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Loading sass.js tasks...ERROR #306

Closed
ericabiz opened this issue Apr 18, 2015 · 12 comments
Closed

Loading sass.js tasks...ERROR #306

ericabiz opened this issue Apr 18, 2015 · 12 comments

Comments

@ericabiz
Copy link

Hi,

I'm on Mac OS X Yosemite and having the same issue as described in #209. I tried all of the fixes listed and could not get anything to work. I even tried uninstalling everything and installing node v0.10.33, and going through the whole setup for FoundationPress again. That did not work either.

I noticed the issue was closed, so has there been any resolution on this?

erica@[/Volumes/asz/wp-content/themes/asz]$ grunt build
Loading "sass.js" tasks...ERROR

Error: libsass bindings not found. Try reinstalling node-sass?
Warning: Task "sass" not found. Use --force to continue.

This all worked fine on my last FoundationPress site, but with this new one I haven't managed to get it working at all.

@olefredrik
Copy link
Owner

Hi Erica,

If you have the latest version of node installed (0.12.0), that should be fully compatible with the latest version of FoundationPress.

Check which version you are using by typing node -v in your terminal. It should echo v.0.12.0. When you have assured that you're using the latest node version, clone the FoundationPress repo to a folder on your harddrive and run a npm install && bower install && grunt build . This should work. Please report back if you have any problems.

Cheers,
Ole Fredrik

@AdamChlan
Copy link
Contributor

If we upgrade node to the latest version, will we have issue compiling older FoundationPress projects?

@olefredrik
Copy link
Owner

@AdamChlan : I would say yes and no. For older FoundationPress projects you will need to update the package.json file with the following config (if you run node v.0.12.0)

{
  "name": "foundationpress",
  "version": "5.5.1",
  "devDependencies": {
    "node-sass" : "~2.0.1",
    "grunt": "~0.4.1",
    "grunt-contrib-watch": "~0.5.3",
    "grunt-sass": "~0.18.0",
    "grunt-contrib-copy": "~0.4.1",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-uglify": "~0.2.7",
    "grunt-string-replace": "~0.2.7"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/olefredrik/FoundationPress.git"
  },
  "dependencies": {
    "time-grunt": "^1.1.0"
  }
} 

Save the package.json file, open your terminal, navigate to the theme folder and run a npm install && bower install && grunt build and you should be good to go.

@ericabiz
Copy link
Author

I just tried this whole thing on a new Digital Ocean instance (instead of locally on my Mac) and it just worked. I will dig into further incompatibilities on my Mac today.

@ericabiz
Copy link
Author

Wow. Okay, so it works now! Here's what I did:

I re-upgraded to Node 0.12.2 (latest) using the Mac package
I created a new directory locally, under my home directory
I re-cloned the git repo, ran all 5 commands to install FoundationPress starting with npm install -g grunt-cli

The last command was grunt build, which worked!

I then just copied my working new install, completely overwriting the broken install. The broken install was a mounted volume on WP Engine (I'm using Transmit to mount a SFTP folder as a drive, so I can actually work on the server live.)

The copy finished, I ran grunt build and it worked!

I'm still not sure where the error was, but it seems a complete reinstall of everything was the charm. :)

As a side note, Transmit is great for being able to work directly on the server, and mounting a SFTP folder from a host on a drive, but don't try to run "npm install" etc. directly on the server that way--it takes FOREVER! Run everything locally first, then just copy all the files over and run grunt watch on the server. Saves an hour or so. ;)

@olefredrik
Copy link
Owner

I'm glad that it worked out :)

@nsberrow
Copy link

nsberrow commented Jul 3, 2015

I had this error, was driving me crazy. Tried uninstalling, installing Node, in the end after 3 days of frustration it came down to the foundation.scss file, I added a custom scss and for some reason it was breaking the run build and prevented me to run watch.

Try that, see if that prevents your error.

@Aetles
Copy link
Contributor

Aetles commented Jul 10, 2015

Just a FYI: when I got the Error: libsass bindings not found. Try reinstalling node-sass while running npm install a npm rebuild node-sass solved it.

@phylaxis
Copy link

I'm getting this error after upgrading to OS X 10.11 El Capitan. I attempted the reinstalling node-sass and it ran without errors. But I'm still seeing this:

Loading "sass.js" tasks...ERROR
>> Error: The `libsass` binding was not found in /Users/phylaxis/Sites/macobserver/tmo_wp/wp-content/themes/Observer/node_modules/grunt-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node
>> This usually happens because your node version has changed.
>> Run `npm rebuild node-sass` to build the binding for your current node version.

I checked my Node version running a node -v, but I get 'v4.2.1' which is the latest on the Mac. I'm confused because in this thread it says '0.12.2' is the latest?

@arielnoname
Copy link

@phylaxis check this #209 (comment)

@phylaxis
Copy link

Thanks, but that didn't make any difference for me. Running node 0.10.33 yielded the same error

@phylaxis
Copy link

@arielnoname Ok. Got it working now. I realized I had already followed the instructions from @olefredrik to "fix" the package.son file to work with node 0.12.0. So I just followed your instructions, but did an nvm install 0.12.0 and now things are working. Thanks for the help.

@olefredrik any chance on getting FoundationPress to play nice with the latest version of Node.js?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants