NPM Install <name>
Installing the Nodejs Dependency Package
For example, npm install Express installs the latest version of Express by default, or you can install the specified version by adding the version number later, such as NPM Install [email protected]
NPM Install <name>-G
To install a package into a global environment
But in the code, the direct way through require () is that there is no way to call a globally installed package. The global installation is for the command line, as if the Vmarket is installed globally, you can run the VM command directly on the command line
NPM Install <name>--save
At the same time as the installation, the information is written to Package.json
If you have a package.json file in the project path, you can use the npm install method directly according to the dependencies Configure all dependent packages to be installed . When this code is submitted to GitHub , it is not necessary to commit the node_modules folder.
NPM Init
Will guide you through the creation of a package.json file, including the name, version, author information, etc.
npm Remove <name> Remove
NPM update <name> update
NPM ls lists all the packages that are currently installed
NPM root View the installation path for the current package
NPM root-g View the installation path for a global package
NPM Help
Kill lui lei Dog---Common commands for NPM in node. JS---2node.js