NodeJS镜像源配置

NodeJS源配置

本文来源:Moeomu的博客

安装

Debain(Ubuntu, etc.)

1
2
apt install node
apt install yarn

macOS

1
2
brew install node
brew install yarn

配置镜像源

设置为淘宝镜像源

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

重置为官方镜像源

1
2
npm config set registry https://registry.npmjs.org/
yarn config set registry https://registry.yarnpkg.com/
Built with Hugo
主题 StackJimmy 设计