Skip to content

Instantly share code, notes, and snippets.

@secf4ult
Created July 28, 2020 13:02
Show Gist options
  • Save secf4ult/ec7352215b5ff7fb2591559ef37d7d9f to your computer and use it in GitHub Desktop.
Save secf4ult/ec7352215b5ff7fb2591559ef37d7d9f to your computer and use it in GitHub Desktop.
Setup npm mirror in China
# taobao mirror
npm config set registry https://registry.npm.taobao.org/
npm config set disturl https://npm.taobao.org/mirrors/node/
# thrid-party module
MIRROR_HOST=https://npm.taobao.org/mirrors
npm config set sass_binary_site $MIRROR_HOST/node-sass/
npm config set sharp_dist_base_url $MIRROR_HOST/sharp-libvips/
npm config set electron_mirror $MIRROR_HOST/electron/
npm config set puppeteer_download_host $MIRROR_HOST/puppeteer/
npm config set phantomjs_cdnurl $MIRROR_HOST/phantomjs/
npm config set sentrycli_cdnurl $MIRROR_HOST/sentry-cli/
npm config set sqlite3_binary_site $MIRROR_HOST/sqlite3/
npm config set python_mirror $MIRROR_HOST/python/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment