Installing Packages
Install a package
From the project folder that contains package.json:
npm install chalk
# or a specific version:
npm install chalk@5
Use the package
Example with ESM after install:
import chalk from "chalk";
console.log(chalk.green("Ready"));
Dev vs runtime deps
Tools used only while developing go in devDependencies.
npm install --save-dev nodemon
Remove and audit
Clean unused packages and check for known issues.
npm uninstall chalk
npm audit
Comments
One comment per signed-in account. Comments are saved with this page’s URL.