debian安装node.js, 并配置npm vue yarn等

网站下载

Download | Node.js

解压缩

xz -d node.tar.xz

tar -xvf node.tar

加入到path

vim /etc/profile

export PATH=/usr/local/node-v12.16.1-linux-x64/bin/:$PATH

镜像加速

  • npm config set registry=https://registry.npmmirror.com/

设置缓存

npm config set prefix "D:\system\nodejs\node_global"

npm config set cache "D:\system\nodejs\node_cache"

npm换源

npm换源 - 简书

yarn的安装和使用

yarn的安装和使用-CSDN博客

node js vue npm 常用命令

在用户根目录下/home/youname

tar -xvJf node-v12.16.1-linux-x64.tar.xz

vim ~/.profile

export PATH=/pathto/node-v12.16.1-linux-x64/bin/:$PATH

使用国内镜像加速npm和yarn

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

npm config set prefix ~/npm_global/

npm config set cache "E:\work_cache\node_cache"

npm install -g yarn

npm install -g @vue/cli

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

yarn config set cache-folder "你的磁盘路径"

yarn config set global-folder  xxxxx

npm -g bin 查看npm bin目录

yarn global dir yarn全局目录

yarn global bin yarn bin目录

在新项目中使用 Vant 时,推荐使用 Vue 官方提供的脚手架 Vue Cli 创建项目

# 安装 Vue Cli

# 创建一个项目

vue create hello-world

# 创建完成后,可以通过命令打开图形化界面,如下图所示

vue ui

vue ui -H 192.168.56.40

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值