NPM Useful Commands
Posted on: 2017-11-02
This article will be pretty slim but can be helpful for more than just myself so I am sharing. Here are some commands available with NPM that you may not know that can be useful.
To know packages that are installed globally:
npm list -g --depth=0
To know where the packages are installed. It gives the global location if no node_modules folder in the direct folder parent tree:
npm root npm root -g // The global folder
To know your NPM version and the actual released version
npm root
To know all available version of a library:
npm show react-native versions
To get all your direct dependencies current version and latest:
npm out --depth=0