众所周知的原因,基本所有外国的开发工具的默认源被墙了,对于 Node.js 的产品,我们可以使用淘宝提供的国内源。
npm
编辑 ~/.npmrc
文件写入以下内容:
registry=https://registry.npm.taobao.org
cache=~/.npm/cache/
disturl=https://npm.taobao.org/dist
安装版本检查工具:
$ npm -g npm-check
$ npm-check -gu
现在可以轻松做一个版本控了。
apm
新建或编辑 ~/.atom/.apmrc
文件,加入以下两行:
registry=https://registry.npm.taobao.org/
strict-ssl=false
保存并退出。
测试是否可用:
$ apm install --check