Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.