#4: Packages and npm :: NodeCasts: Free Node.js Screencasts

Episode 4: Packages and npm

Published Aug 20, 2026 · 8:53 · 7 comments

Packages let developers share their modules with the broader community. In this episode, you'll see how npm is used to install packages and to keep track of the dependencies your application depends on.

Nodecasts logo
Nodecasts
Download WebM (14 MB) Download MP4 (35 MB)

Show Notes

This episode uses Node.js v0.8.5; download and documentation links are provided below.

Links

Everyday npm Commands

Comments

Avatar of Sean Dick
Sean Dick, 14 years ago: Nice! I was unaware of npm shrinkwrap.
Avatar of Alex Bezuska
Alex Bezuska, 14 years ago: You have succeeded if even a js noob like me understands all of this so far. Great job. Can't wait for the next episode!
Avatar of selevanm
selevanm, 14 years ago: Precise, to the point, very well done.
Avatar of Martin Jarvis
Martin Jarvis, 14 years ago: Great job, well done. I will be watching every week from now on.
Avatar of Prem Pillai
Prem Pillai, 14 years ago: Great job again!
Avatar of Simon
Simon, 14 years ago: This is really great, Love your 5 screencasts and I hope you'll get the time to make some more! There is alot of change in the node community/code and as a noob in node it is really helpful with updated tutorials like this one!
Avatar of Vidal Graupera
Vidal Graupera, 14 years ago: Very nicely done. Please do more screencasts
Log in to add your comment!

Frequently Asked Questions

What is a package in Node.js?
A package is how programmers share their modules with the world. As this episode explains, packages let you publish reusable code and pull in code others have published, instead of building everything from scratch.
What is npm used for?
npm is the tool for installing packages and managing an application's package dependencies. The show notes cover common commands including npm init, npm install <package>, npm update <package>, npm outdated, and npm ls.
How do I create a package.json file?
Run npm init to build a package.json file interactively. That file describes your package and records the dependencies your application relies on.
How do I install a package and save it as a dependency?
Use npm install <package> to add a package to node_modules, or npm install <package> --save to install it and record a dependency entry in package.json.
What is semantic versioning and how does it affect dependencies?
Semantic versioning is the versioning scheme linked in the show notes, and npm documents how dependency versions are written in package.json. That version specification decides which newer releases npm update and npm outdated treat as allowed.
How can I see which packages my package depends on?
Run npm ls to list every package your package depends on.

Copyright © 2012 Brandon Tilley

Node.js is an official trademark of Joyent. This site is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.

Once you're comfortable with the basics, the same npm workflow scales to larger projects: package.json records what your app needs, node_modules holds the installed code, and commands like npm update, npm outdated, and npm ls help you keep dependencies current and visible. Pairing that workflow with semantic versioning gives you a predictable way to decide when a newer release is safe to adopt.