npm 使用

安装cnpm        npm install -g cnpm --registry=https://registry.npmmirror.com

使用淘宝镜像安装
npm install XXX --registry=https://registry.npmmirror.com

修改默认安装镜像 npm config set registry https://registry.npmmirror.com
原来的 https://registry.npm.taobao.org 已替换为 https://registry.npmmirror.com 
查看npm当前镜像    npm config get registry
如果要查看某个模块的版本号    npm list grunt
查看所有全局安装的模块       npm list -g
查看某个包的可安装版本 npm view pkg versions //例如npm view mime versions
npm 安装模块
1,安装在当前目录
npm install vue-cli
2,安装在全局中
npm install -g @vue/cli
npm 删除模块
1,删除当前目录
npm uninstall vue-cli
2,删除全局目录
npm uninstall vue-cli -g
 
posted @ 2024-05-07 20:53  晨曦与晚霞之间  阅读(12)  评论(0编辑  收藏  举报