Skip to content

Instantly share code, notes, and snippets.

@ericrasch
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericrasch/37df6f0d1d2addc1f4d2 to your computer and use it in GitHub Desktop.
Save ericrasch/37df6f0d1d2addc1f4d2 to your computer and use it in GitHub Desktop.
NPM + Gulp.js errors (npm ERR + throw err + libsass) have been resolved...

When running npm update I was getting this error: npm ERR! cb() never called!

This answer on StackOverflow helped solve that issue:

So here's the fix for that. These steps are from David Walsh's blog

  1. Clear your npm cache: sudo npm cache clean -f
  2. Install the latest version of the Node helper: npm install -g n
  3. Tell the helper (n) to install the latest stable version of Node: sudo n stable
  4. Run npm install

Here are my version numbers BEFORE / AFTER:

BEFORE
node -v
v0.10.35

npm -v
2.1.17
AFTER
node -v
v0.12.4

npm -v
2.10.1

After that, I started receiving an error right when running gulp --dev:

module.js:338
    throw err;

This answer on StackOverflow suggested running npm update -g

That helped, but then I was getting Error: libsass bindings not found in in the middle of a gulp build.

To which I had 2 choices:

  1. Run npm install gulp-sass OR
  2. Delete the node_modules folder completely and run npm install again

I actually chose to delete the node_modules folder completely since I wanted to make sure I was running the latest of everything... cleanly.

Long story short, everything is working again, gulp --dev is build and the major issue I was having with gulp-imagemin has been resolved and it's processing images once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment