打开 cmd,输入 npm config edit 打开 .npmrc 文件

文件顶部设置  registry=xxx  下增加一行:electron_mirror=https://cdn.npm.taobao.org/dist/electron/

;;;;
; npm userconfig file
; this is a simple ini-formatted file
; lines that start with semi-colons are comments.
; read `npm help config` for help on the various options
;;;;

registry=https://mirrors.huaweicloud.com/repository/npm/
electron_mirror=https://cdn.npm.taobao.org/dist/electron/
//registry.npmjs.org/:_authToken=5fa01e51-cf4c-49c0-98da-f1bbc6247213

;;;;

参考链接:https://juejin.cn/post/6855526489904349198

posted on 2022-05-18 22:46  W1N9s  阅读(34)  评论(0编辑  收藏  举报