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.
James Barrett13,253 Points
Updating an individual package
I notice that Andrew uses the
npm outdated command to check which packages are outdated. When
npm update is ran, is this going to update all packages in the package.json file? If so, how would we update one individual package? Would it merely be a case of adding the package name after the
npm update command? For example:
npm update [packageNameHere]
When npm update is ran, is this going to update all packages in the package.json file?
Yes, it will update all dependencies listed in the package.json file.
Would it merely be a case of adding the package name after the npm update command?
Yes, the example command you provide is entirely valid, if you specify a name then npm will only update that specific package.