How to tell if npm package was installed globally or locally

后端 未结 6 1312
遇见更好的自我
遇见更好的自我 2020-12-22 17:25

I am installing grunt, node, npm, bower, and grunt-cli on windows7.

The instructions say i should run the install commands with -g flag for global.

How can I

6条回答
  •  眼角桃花
    2020-12-22 17:34

    You can list all global packages with the command:

    npm ls -g
    

    Or check for a specific package with:

    npm ls -g [package-name] 
    

    For example: npm ls -g @angular/cli

提交回复
热议问题