Using npm, how can you display a list of all installed global packages?
Experience Level: Junior
Tags: npm
Answer
To display a list of globally installed packages (modules), open the command-line, change your current directory to the directory that contains your project with file package.json and run the following command:
npm list -g
Related npm job interview questions
How do you update npm packages to new versions?
npm JuniorUsing npm, how can you install multiple modules at once locally?
npm JuniorWhat does npm audit fix command do and when would you use it?
npm JuniorUsing npm, how do you list installed modules?
npm JuniorUsing npm, how do you check if there is a newer version of some the project package?
npm Medior