npm常见命令

npm install -g nrm
nrm ls

* npm -------- https://registry.npmjs.org/
  yarn ------- https://registry.yarnpkg.com/
  cnpm ------- http://r.cnpmjs.org/
  taobao ----- https://registry.npm.taobao.org/
  nj --------- https://registry.nodejitsu.com/
  npmMirror -- https://skimdb.npmjs.com/registry/
  edunpm ----- http://registry.enpmjs.org/

nrm use taobao

npm常见命令
mac安装为(sudo npm …)
sudo npm install @vue/cli -g
或者授权这个文件夹,以后就不用sudo了:
sudo chown -R $USER /usr/local


npm list -g --depth 0 //查看安装的全局包

npm get registry --显示当前的镜像网址
npm config set registry http://registry.npm.taobao.org – 使用淘宝的镜像网址
npm config set registry https://registry.npmjs.org // 源地址

npm --registry=https://registry.npm.taobao.org i

npm install -g cnpm --registry=https://registry.npm.taobao.org
//安装cnpm,淘宝镜像,为了提高npm使用效率

npm i @vue/cli -g
//全局安装vue-cli最新版本

vue create hello-world
//创建hello-world项目

vue ui
//可视化编辑

npm init -y //初始化package.json文件,默认yes

删除vue-cli方法:
mac电脑到这里直接删除文件夹
/usr/local/lib/node_modules/vue-cli/node_modules

// 测试单个组件文件
npm install -g @vue/cli-service-global
vue serve 组件名.vue

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

前端段

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值