Local vs global tools, bins, and team-friendly workflows
Prefer local (project) tools over global installs; understand package "bin" commands, npm-run PATH, and simple team workflows.
Why local tools?
Goal: Run the same tools everywhere.
- Prefer local tools (devDependencies)
- Use npm scripts so PATH includes local node_modules/.bin
- Understand bin entries in packages
- Avoid global drift

Local beats global
npm run automatically adds node_modules/.bin to PATH, using the project's tool version.
// Emulate running a tool locally vs globally
function runLocal() {
console.log("npm run lint");
console.log("→ uses node_modules/.bin/eslint (project version)");
}
function runGlobal() {
console.log("eslint .");
console.log("→ might use a different global version on each machine");
}
runLocal();
runGlobal();

All lessons in this course
- package.json, scripts, and deps vs devDeps
- npx and semantic versioning ranges
- Local vs global tools, bins, and team-friendly workflows