NoNode.js · Lesson 4 of 7
Modules & npm
Node's module system lets you split code across files. npm (Node Package Manager) gives you access to millions of packages. package.json describes your project and its dependencies.
✦ Tip
Always commit `package-lock.json` — it records exact versions of every dependency. Never commit `node_modules/`. Add it to `.gitignore`. The lock file ensures everyone on the team (and CI) gets identical installs, preventing "works on my machine" bugs.
Always commit `package-lock.json` — it records exact versions of every dependency. Never commit `node_modules/`. Add it to `.gitignore`. The lock file ensures everyone on the team (and CI) gets identical installs, preventing "works on my machine" bugs.