1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 21:42:08 +02:00
tldr/pages/common/npm-install.md
2024-11-16 13:06:27 +01:00

595 B

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:

npm install {{package_name}} {{-D|--save-dev}}

  • Download the latest version of a package and install it globally:

npm install {{-g|--global}} {{package_name}}