Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Gulp Basics Improving your Gulp Task Pipelines Where to next?

Ben Attenborough
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Ben Attenborough
Front End Web Development Techdegree Graduate 32,769 Points

lib-sass error and its solution

When I ran gulp I got the following error: Error: 'libsass' bindings not found. Try reinstalling 'node-sass'?

I found the soultion was to uninstall and re-install gulp sass:

npm uninstall --save-dev gulp-sass
npm install --save-dev gulp-sass@2

That worked, but I'm confussed as to what the @2 does. I found the solution here: http://stackoverflow.com/questions/28409100/try-reinstalling-node-sass-on-node-0-12

I would also find it useful if someone could explain the difference between npm install and npm install --save-dev

Thanks!

Hi Ben,

I'm sure you figured it out by now but if anyone runs into the same questions:

npm install is going to look for your package.json file and install ALL the dependencies in the node modules that you have listed there.

I'll break npm install --save-dev down into two steps.

First what does --save do: --save adds your package in your dependencies section in your package.json file. This saves you a step as opposed to installing the package, then manually going in and adding it into your package.json file.

Second -dev: this adds the package into your dev dependency. This is useful because if someone is downloading your files and putting them straight into production, they wouldn't need to install all the extra packages you used during production, packages you used to run gulp for example. You still have access to them in your package.json file.

Hope that helps anyone else.