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

Development Tools

npm install doesn't create subfolder in npm_modules

I've downloaded the foundation 6 Sass Version. Now I want to add some more gulp plugins to my node_modules folder.

I've navigated to my foundation root folder and typed the command

sudo npm install --save gulp-uglify

into the terminal. Now it installs all the stuff into the node_modules folder but without creating the subfolder "gulp-uglify". Consequently there are hundreds of files and folders in my node_modules folder.

Thanks for your help. Robin

1 Answer

Colin Marshall
Colin Marshall
32,861 Points

In your package.json file does it list gulp-uglify under the dependencies? If so, try running just npm install from your root project directory and see if the folder for gulp-uglify shows up under your node_modules directory.

PS you shouldn't need to add the sudo command when you're installing inside a project (as opposed to globally with the -g flag).

I think I'm having the same problem. I try to install gulp with: npm install gulp --save-dev

It seems like it is pulling down gulp but not in a gulp folder. I tried just npm install since it is one of my devDependencies but the same thing happens.

Thanks for the help.

Matt