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

libsass binding was not found - error #724

Closed
GarySwift opened this issue Feb 12, 2016 · 2 comments
Closed

libsass binding was not found - error #724

GarySwift opened this issue Feb 12, 2016 · 2 comments

Comments

@GarySwift
Copy link
Contributor

I'm having trouble with an older version of FoundationPress. I'm getting the libsass binding was not found error which I know has happened before but it's been a while so I wondering if anybody would have some up to date help with this.

New installs of Foundation work fine, it's just older versions.

mac$ grunt watch
Loading "sass.js" tasks...ERROR
>> Error: The `libsass` binding was not found in /Users/mac/Code/project/wp-content/themes/FoundationPress/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.

My system is set up as follows:

OS X El Capitan 10.11.2
node -v: v4.2.3
npm -v: 3.5.3
bower -v: 1.7.2
grunt --version: grunt-cli v0.1.13

I don't know if this helps but here is the package.json file.

{
 "name": "foundationpress",
 "title": "FoundationPress",
 "version": "1.5.0",
 "description": "FoundationPress is a WordPress starter theme based on Foundation 5 by Zurb",
 "keywords": [
   "FoundationPress",
   "WordPress",
   "starter theme",
   "Foundation",
   "semantic",
   "mobile first",
   "customizable",
   "responsive"
 ],
 "homepage": "http://foundationpress.olefredrik.com/",
 "bugs": "https://github.com/olefredrik/FoundationPress/issues",
 "license": "MIT",
 "main": "Gruntfile.js",
 "repository": {
   "type": "git",
   "url": "https://github.com/olefredrik/FoundationPress.git"
 },
 "devDependencies": {
   "bower": "~1.4.1",
   "grunt": "~0.4.5",
   "grunt-cli": "^0.1.13",
   "grunt-contrib-compress": "~0.13.0",
   "grunt-contrib-concat": "~0.3.0",
   "grunt-contrib-copy": "~0.4.1",
   "grunt-contrib-uglify": "~0.2.7",
   "grunt-contrib-watch": "~0.5.3",
   "grunt-sass": "~1.1.0-beta",
   "grunt-string-replace": "~0.2.7",
   "node-sass": "~3.3.0",
   "time-grunt": "~1.1.0"
 },
 "scripts": {
   "build": "grunt build",
   "grunt": "grunt",
   "postinstall": "bower install && grunt build",
   "watch": "grunt watch",
   "package": "grunt package"
 }
}

Thanks in advance, any help is appreciated.

@GarySwift
Copy link
Contributor Author

I have resolved this issue so I will leave my solution here, which was found here

The libsass binding was not found in x

For context this error is almost always because npm install ran with a
different version of node than the version you're current running.

Since node-sass is a native module we build the c++ code on installation.
That code is tied to the version of node that ran the installation. If you
change your node version the extension needs to be rebuilt, that's what
npm rebuild does.

So there you go, my current version of node was different form the version of node I installed with and npm rebuild fixed the issue.

@olefredrik
Copy link
Owner

Sorry late feedback on this one. Glad to hear that it was resolved.

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

2 participants