1. Enter NPM config ls-l to view the current settings
2, for a certain setting, you can use the following way:
NPM Config Set property Name property value
EG:NPM config set prefix "C:\123\"
3, read a certain configuration, you can use the following way:
NPM Config Get property name
eg:npm config get prefix
4. NPM Common commands:
Npm-v: View the version of NPM installation
NPM Help XXX viewing assistance
NPM Install XXX Installation module
NPM install [email protected] installation 1.1.1 version of XXX
NPM Install Xxx-g installs the module in the global environment.
NPM LS view installed modules and dependencies
NPM LS-G View the globally installed modules and dependencies
NPM Uninstall xxx (-g) Unload module
NPM Cache Clean Cleanup caching
NPM View moudlename dependencies viewing package dependencies
NPM view Modulenames Viewing the Package.json folder of the node module
NPM View ModuleName labelname View the contents of a tag under the Package.json folder
NPM View ModuleName Repository.url Viewing the source file address of a package
NPM View ModuleName Engines View the version of node that the package depends on
NPM Help Folders view all the folders used by NPM
NPM rebuild ModuleName used to change package content after rebuilding
NPM outdated check if the package is obsolete, this command lists all the obsolete packages that can be updated in a timely manner
NPM update ModuleName Updating the node module
NPM root View the installation path for the current package
NPM root-g View the installation path for a global package
NPM init will guide you through the creation of a Package.json file, including name, version, author information, etc.
When NPM search PackageName releases a NPM package, it needs to verify that a package name already exists.
Nodejs NPM Package Management Common Command Introduction