Use-save for packages that need to be used at run time, otherwise use-save-dev Cnpm install-- save for production environment | | cnpm I-S Cnpm install-- save-dev for development environment | | cnpm I-D
npm install [package]
npm i [package]
npm i [package] --registry=https://registry.npmjs.org
two。 Install the package to the node_modules directory Package will be added under the dependencies attribute of package.json
npm install --save [package]
npm install --save-dev [package]
npm install -g [package]
npm uninstall xxx
Delete a global module
npm uninstall -g xxx
npx force-unpublish <packageName> 'message'
npm list -g --depth 0
npm config get registry
npm config set registry url
[npm] https://registry.npmjs.org/ [cnpm] https://registry.npm.taobao.org