Uswds: libsass npm error after upgrading to node 6

Created on 4 May 2016  Â·  4Comments  Â·  Source: uswds/uswds

I got an error after running npm start. Looks related to libsass.

Output of the error:

➜  govt-wide-patternlibrary git:(18f-pages-staging) npm start

> [email protected] prestart /Users/mayaben-ari/Code/govt-wide-patternlibrary
> gulp copy-vendor-sass

(node:26798) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
/Users/mayaben-ari/Code/govt-wide-patternlibrary/node_modules/node-sass/lib/extensions.js:158
    throw new Error([
    ^

Error: The `libsass` binding was not found in /Users/mayaben-ari/Code/govt-wide-patternlibrary/node_modules/node-sass/vendor/darwin-x64-48/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.
    at Object.sass.getBinaryPath (/Users/mayaben-ari/Code/govt-wide-patternlibrary/node_modules/node-sass/lib/extensions.js:158:11)
    at Object.<anonymous> (/Users/mayaben-ari/Code/govt-wide-patternlibrary/node_modules/node-sass/lib/index.js:16:36)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/6.0.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.0.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prestart: `gulp copy-vendor-sass`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prestart script 'gulp copy-vendor-sass'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the uswds package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp copy-vendor-sass
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs uswds
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls uswds
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mayaben-ari/Code/govt-wide-patternlibrary/npm-debug.log

cc: @juliaelman @rogeruiz

Most helpful comment

@rogeruiz yeah I think it couldn't hurt to document this somewhere. The wiki makes sense for now (maybe later on the Standards site). We could have a "Troubleshooting" section.

All 4 comments

I installed [email protected] and it seemed to fix it. See: https://github.com/sass/node-sass/issues/1484

Possibly leaving this open in case others update node.

@maya Seems like this is related to needing to rebuild the libsass binary after the upgrade in order to update the node-binding. _I believe_ that this is an issue whenever you're updating upgrading/downgrading node. But I'm not sure.

Do we think we should be documenting something like this in the readme or wiki for troubleshooting node/npm install or asset pipeline issues? 💭

@rogeruiz yeah I think it couldn't hurt to document this somewhere. The wiki makes sense for now (maybe later on the Standards site). We could have a "Troubleshooting" section.

Troubleshooting page added and included a solve for this particular issue to it 🎉

https://github.com/18F/web-design-standards/wiki/Troubleshooting

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maya picture maya  Â·  4Comments

shawnbot picture shawnbot  Â·  7Comments

adborden picture adborden  Â·  4Comments

mollieru picture mollieru  Â·  4Comments

StraightfaceStudios picture StraightfaceStudios  Â·  4Comments