Debian ovirt nodejs npm yarn
作者:
余带盐 | 来源:发表于
2018-05-23 15:15 被阅读0次
- 安装nodejs v4(代替
stretch
源中的nodejs v4
)
- 配置源
curl -sL https://deb.nodesource.com/setup_4.x | bash -
注:stretch
源中的nodejs v4
本身不带有npm
,也没法通过 apt-get
下载,所以需要手动配置 nodejs
源。如果需要其他版本的nodejs
,只需要把4.x
中的4修改了,比如8.x
10.x
- 下载
apt-get install -y nodejs
- 换源
- 安装
curl sudo
:
apt-get install -y curl sudo
- 下载源
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
- 安装
apt-get install -y nodejs
引用:nodejs安装
- 全局安装本地插件
npm install -g yarn-v0.24.4.tar.gz
注:tar.gz
和zip
后缀的都行;-g
是全局安装,可以在/usr/bin添加引用
image.png
- 根据package.json自动下载包
npm install
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install yarn
引用:yarn
- 全局安装
yarn global add webpack-cli
- 根据package.json下载包
yarn
引用:yarn安装及用法
本文标题:Debian ovirt nodejs npm yarn
本文链接:https://www.haomeiwen.com/subject/namrjftx.html
网友评论