nodejs
Table of Contents
1. 安装
1.1. Ubuntu
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - # 14.x curl -sL https://deb.nodesource.com/setup_18.x | sudo bash - # 18.x sudo apt install nodejs
如果 update 时报错 NO_PUBLIC
在 sources.list 中对应的 deb 后面新增 [trusted=yes]
1。
2. npm
指定源:
npm --registry https://registry.npm.taobao.org/ install xxx
3. yarn
npm install --global yarn
yarn 和 npm 除了安装包命令不同之外,其他基本相同。 npm 是 install
,而 yarn 是 add
。
指定源同样可以通过 --registry https://registry.npm.taobao.org/
的方式。