- To run scripts, enter the following:
npm run [nameofthescriptwithextension]
- To install packages, enter the following:
npm install [nameofthepackage]
- To install packages and save the dependency in package.json, enter the following:
npm i [nameofthepackage] -S
- To list all the node packages installed on your computer, enter the following:
npm list -global true//Or npm ls
- To install a package for global use, add -g at the end:
npm install gulp -g
- To upgrade npm, enter the following:
npm I npm@latest -g