![]() list -g: display a tree of packages found in the user’s folders (without the -g option, it will list down packages in the current directory) -depth 0: don't include package’s dependencies in the tree. If you’re using NPM v7, use the -all config to display the dependencies of installed packages (or use -depth=1 to display only top-level dependencies. Here the explanation of the command: npm: Node Package Manager command line tool - package manager for the JavaScript programming language. Starting from NPM version 7, the dependencies of each installed package will be hidden from the output by default. ├── display a list of installed packages in NPM version 7, use the npm list -g command.įor version 6 and below, use the npm list -g -depth=0 command.īy default, NPM version 6 and below will print out the dependencies, which you can hide by using the -depth=0 command. npm install expressTo install it globally, run the above command with -g option. Open Node. Although it will also produce the same result but modules will be installed globally. ![]() ![]() Let's install express module using global installation. $ npm list -prefix /Users/nsebhastian/Desktop/test/nodeWs To install express.js using npm, run the following command. Open the Node.js command prompt and execute 'npm ls': Globally installed packages/dependencies are stored in system directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |