当前位置:网站首页>NPM and package common commands

NPM and package common commands

2022-07-05 07:12:00 Weft collar network

1、 function npm install command ( or npm i) Install all dependent packages at once
 npm install

2、 Uninstall package npm uninstall Be careful :npm uninstall After the command is executed successfully , Will unload the package , Automatically from package.json Of dependencies Remove the
 npm uninstall

3、 Install the specified package and record it to devDependencies node

npm i  Package name  -D

4、 View the current package image source

npm config get registry

4、 Switch the image source of the next package to Taobao image source

npm config set registry=https://registry.npm.taobao.org/

5、 adopt npm Package manager , take nrm Install as a globally available tool

npm i nrm -g

6、 View all available mirror sources

nrm ls

7、 Switch the image source of the next package to taobao Mirror image

nrm use taobao

 8、 View the packages that have been installed

npm list -g --depth 0 

原网站

版权声明
本文为[Weft collar network]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140559586428.html