How to tell if an npm package was installed globally or locally

Use the list command with the -g flag to see all packages that are installed globally:

npm list -g

To check if a specific package is installed globally, you can provide the name of package (grunt in this case) as seen below:

npm list -g grunt

Or you can use grep to filter on package names:

npm list -g | grep grunt

Source: https://docs.npmjs.com/cli/ls

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)