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 npm Basics (retiring) Updating and Uninstalling Packages with npm Updating Global Packages with npm

I'm getting an error and I don't understand why?

npm update -g

Bummer: Uh, oh. This will update all global packages. You're missing the npm package

Hi Jamar,

What error are you receiving? Also, please copy and paste your code so that we can see what you've written.

I just edited it Brandon.

1 Answer

Okay Jamar,

So you’ve not included which package you want to update, so you’re essentially telling npm to update everything.

In the following code: npm update -g

The first npm denotes which app/program to use to interpret the commands that follow, update says you want to update a package, and the -g flag is like passing an argument that says “update the global version of the package”. But you’re missing the argument that denotes which package to update.

npm update npm -g is the statement that will allow you to pass the challenge. That one is meta so it’s a bit tricky.

WOW!! Thats crazy something so small i missed.... Thanks Brandon.