npm Install <name> installation Nodejs Dependency Pack
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 packages are installed in the 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 to write information to Package.json
in the project path if when there is a Package.json file, directly You can use the NPM install method to 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 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 helps, if you want to view the help of the install command separately , you can use the NPM helper install
NPM Common Commands