Skip to content

Instantly share code, notes, and snippets.

@taballa
Last active December 21, 2015 13:58
Show Gist options
  • Select an option

  • Save taballa/6316043 to your computer and use it in GitHub Desktop.

Select an option

Save taballa/6316043 to your computer and use it in GitHub Desktop.
shell: npm package site mirrors
修改 ~/.npmrc 添加
registry = https://registry.npmjs.org
registry = http://npm.tuna.tsinghua.edu.cn/registry
使用 npm config 在 shell 里输入:
npm config set registry http://npm.tuna.tsinghua.edu.cn/registry
未把我们设置为默认源 在 shell 里输入
npm --registry http://npm.tuna.tsinghua.edu.cn/registry install <packagename>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment