How to set registry to NPM and Yarn
If you're in China and encounted a problem that it's too slow or even unable to connect https://registry.yarnpkg.com
, you can set yarn registry to https://registry.npmmirror.com
which is a npmjs.org mirror in China.
Run command:
# Set registry globally
yarn config set registry https://registry.npmmirror.com
npm config set registry https://registry.npm.taobao.org
# Set register temporarily
npm --registry https://registry.npm.taobao.org install express