2025-03-14 21:59:59 -06:00
|
|
|
# npm install
|
|
|
|
|
|
|
|
|
|
> Install Node packages.
|
|
|
|
|
> More information: <https://docs.npmjs.com/cli/commands/npm-install>.
|
|
|
|
|
|
|
|
|
|
- Install dependencies listed in `package.json`:
|
|
|
|
|
|
|
|
|
|
`npm install`
|
|
|
|
|
|
|
|
|
|
- Download a specific version of a package and add it to the list of dependencies in `package.json`:
|
|
|
|
|
|
|
|
|
|
`npm install {{package_name}}@{{version}}`
|
|
|
|
|
|
|
|
|
|
- Download the latest version of a package and add it to the list of dev dependencies in `package.json`:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`npm install {{package_name}} {{[-D|--save-dev]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Download the latest version of a package and install it globally:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`npm install {{[-g|--global]}} {{package_name}}`
|