npm、electron、nodejs等镜相操作,看这篇就够了

1.得到当前的镜像地址

npm get registry 

> https://registry.npmjs.org/

2.npm,yarn设成淘宝的

npm config set registry http://registry.npm.taobao.org/

yarn config set registry http://registry.npm.taobao.org/

2.换成原来的

npm config set registry https://registry.npmjs.org/

3. Electron 换成淘宝镜相

set ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/


4. 手动设置镜相

在用户目录中打开( 如C://[用户名]/.npmrc

registry=https://registry.npm.taobao.org

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

electron_mirror=https://npm.taobao.org/mirrors/electron/

其它镜像:

开源镜像: http://npm.taobao.org/mirrors

Node.js 镜像: http://npm.taobao.org/mirrors/node

alinode 镜像: http://npm.taobao.org/mirrors/alinode

phantomjs 镜像: http://npm.taobao.org/mirrors/phantomjs

ChromeDriver 镜像: http://npm.taobao.org/mirrors/chromedriver

OperaDriver 镜像: http://npm.taobao.org/mirrors/operadriver

Selenium 镜像: http://npm.taobao.org/mirrors/selenium

Node.js 文档镜像: http://npm.taobao.org/mirrors/node/latest/docs/api/index.html

NPM 镜像: https://npm.taobao.org/mirrors/npm/

electron 镜像: https://npm.taobao.org/mirrors/electron/

node-inspector 镜像: https://npm.taobao.org/mirrors/node-inspector/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。