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 trialIan Mackenzie
11,062 Pointsnpm install gulp-uglify --save-dev
Looks like it installs ok but it's not showing in the package.json file?
10 Answers
Ian Mackenzie
11,062 PointsI ran the install 3 times and it eventually worked. I'm finding NPM is not the most reliable package manager. It's a shame there is not an alternative to install node modules.
Unsubscribed User
501 PointsDid you do $ npm init before this command?
Ian Mackenzie
11,062 PointsYes I used the npm init command at the beginning of the course which created the package.json file.
Unsubscribed User
501 PointsUnfortunately no idea. It is working for me!
Ian Mackenzie
11,062 PointsYes, sometimes it works and sometimes it doesn't. Apparently I'm not the only one as many people have the same problem.
Unsubscribed User
501 Pointsisn't that some weird permission problem? Did not you create the package.json file as a sudo or something? Just guessing. I never experienced this bug.
Ian Mackenzie
11,062 PointsI may have created it using sudo? Can't remember. Enjoying learning about Gulp though, pretty cool task runner :)
Unsubscribed User
501 PointsYes. I disliked Grunt in the past. i use only Gulp these days for a lot of task. I have a quite complex Angular project and i have written the build process in Gulp.
Rafael silva
23,877 Pointshey bro if you're on linux using sudo npm install gulp-uglify --save-dev if not you're on windows use the npm install gulp-uglify --save-dev
but if you don't create the file package.json you can't follow along , first using the npm init create the package json and after you can install all these , I hope help you with something ..
Unsubscribed User
501 PointsI have never experienced problems. Could you pleaese answer my question?
Did you do $ npm init before run $ npm install ... ?
Oualid Jniyah
21,607 PointsOualid Jniyah
21,607 Pointstry to run the {npm init} command one more time to load the dependencies to your package.json. they will list under "dependencies" not "devDependencies". here a screenshot of my package.json http://i.imgur.com/DuYWYsW.png
you can also take a look at this link that explains the difference between the two : http://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies