NPM Useful Commands
Posted on: November 2, 2017
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:
1npm 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:
1npm root npm root -g // The global folder
To know your NPM version and the actual released version
1npm root
To know all available version of a library:
1npm show react-native versions
To get all your direct dependencies current version and latest:
1npm out --depth=0