目 录CONTENT

文章目录

00yarn与npm的第三方源配置

Administrator
2020-07-24 / 0 评论 / 8 点赞 / 8905 阅读 / 2109 字 / 正在检测是否收录...

yarn与npm的第三方源配置

npm的配置

这是新版本的npm第三方源的配置,如果需要旧版本的配置,可以继续向后面看

$ npm config set registry https://registry.npmmirror.com

如果想切回本源,使用下面的使用

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

yarn的配置

$ yarn config set registry https://registry.npmmirror.com

yarn 设置回本源

$ yarn config set registry https://registry.yarnpkg.com/

旧版本的npm配置

$ npm config set registry https://registry.npm.taobao.org
$ npm config set disturl https://npm.taobao.org/dist
$ npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
$ npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
$ npm config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/

旧版本的yarn配置

$ yarn config set registry https://registry.npm.taobao.org -g
$ yarn config set disturl https://npm.taobao.org/dist -g
$ yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/ -g
$ yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ -g
$ yarn config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/ -g
$ yarn config set chromedriver_cdnurl https://cdn.npm.taobao.org/dist/chromedriver -g
$ yarn config set operadriver_cdnurl https://cdn.npm.taobao.org/dist/operadriver -g
$ yarn config set fse_binary_host_mirror https://npm.taobao.org/mirrors/fsevents -g

$ yarn config set sass_binary_path D:\\杨标的工作文件\\HTML5\\win32-x64-57_binding.node -g
8

评论区