How do I install a library or package into my coding project?
You'll be able to: Install npm packages and add project dependencies from the terminal
- Risk
- Safe to try
- Windows
- Windows 11 · Windows 10
Filed under Programming & tools
The steps
- 1
Open your project folder in VS Code and press Ctrl~ to open the integrated terminal. The terminal pane opens at the bottom of VS Code showing your project directory path.
What is a package manager?
Package managers (like npm or bun) let you download and reuse pre-written, open-source code libraries without writing everything from scratch.
- 2
Type npm install package_name (replace
package_namewith the actual library name, likelodashorzod) and press Enter. The terminal downloads the package files and prints a completion summary with added package count.
- 3
Look at the file explorer sidebar on the left side of your editor. The library name appears under
dependenciesinside yourpackage.jsonfile, and downloaded files reside safely in thenode_modulesfolder.
It looks different on my screen
If you are using Bun instead of Node/npm, type bun add package_name for ultra-fast package installations.
Did this work?
Updated 2026-08-29اقرأ بالعربية