How to get the node.js package path(wherever installed) along with its name and version

I know with this(npm -g ls --json) command we will get package name and version. I also need complete path where the package is installed globally

You can use the --long option which will show extended information including paths.

npm ls -g --json --long