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 Gulp your JavaScript Workflow Using Third Party Gulp Libraries

Thomas Santoro
Thomas Santoro
4,007 Points

If I forget "--save-dev"?

While adding gulp-concat in this video, I accidentally typed "npm install gulp-concat" without adding "--save-dev". I understand that --save-dev places this dependency in my devDependencies list in my package.json file. But I'm a bit unclear on what I did when I didn't add the --save-dev bit. What should I do if I find I've improperly installed an npm or gulp package in this way, and what BAD THING might happen if I'm careless and don't correct it?

1 Answer

Bruno Navarrete
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Bruno Navarrete
Full Stack JavaScript Techdegree Graduate 22,246 Points

To correct this, just run npm uninstall gulp-concat and then npm install gulp-concat --save-dev

Nothing bad will happen, it will just be saved as a dependency instead of a devDependency which means it will be treated as necessary to run your npm module. devDependencies are only used in the development environment of your module, so they will be used by other developers when pulling your code. You can read more about this in npm "dependencies" vs "devDependencies".