NPM Link & Local Dev in NPM

From the NPM Package Manager cheat sheet · Workspaces & Advanced · verified Jul 2026

NPM Link & Local Dev

Link local packages for development

bash
# Link package globally
cd my-package
npm link

# Use linked package
cd my-app
npm link my-package

# Unlink
npm unlink my-package
cd my-package && npm unlink

# List linked packages
npm ls -g --depth=0 --link

# Link specific package
npm link ../local-package
💡 npm link creates symlinks for local dev
📌 Great for testing packages before publishing
⚠️ Remember to unlink when done
⚡ file: protocol copies, link: symlinks
🟢 Essential for package development
linkdevelopment

More NPM tasks

Back to the full NPM Package Manager cheat sheet