npm init -y # -y to initialize with default values.
npm i package # to install locally. i is short for install npm i -g package # to install globally
npm install package@version
npm i -d package # -d stands for --save-dev i.e install as dev dependency
npm list # this will list all the dependencies of the third-party modules as well
npm list --depth=0
npm view package
8. See specific information from package.json of a third-party package like dependencies of the package
npm view package dependencies
npm view package versions
npm outdated # run with -g flag to check globally
I hope this helps. Let me know if you use any other commands that can be helpful.
Thanks for reading. 😀