美文网首页
NPM淘宝源electron下载失败解决方案

NPM淘宝源electron下载失败解决方案

作者: 羋学僧 | 来源:发表于2024-06-26 22:03 被阅读0次

    NPM淘宝源electron下载失败解决方案

    2021 年,淘宝就发文称,npm 淘宝镜像已经从 registry.npm.taobao.org 切换到了 registry.npmmirror.com。

    重新配置npm的镜像地址。我们可以使用如下配置:

    npm config set registry https://registry.npmmirror.com/
    npm config set electron_mirror https://npmmirror.com/mirrors/electron/
    npm config set electron_builder_binaries_mirror https://npmmirror.com/mirrors/electron-builder-binaries/
    npm config set sqlite3_binary_host_mirror https://npmmirror.com/mirrors/sqlite3/
    npm config set chromedriver_cdnurl https://npmmirror.com/mirrors/chromedriver/
    npm config set operadriver_cdnurl https://npmmirror.com/mirrors/operadriver/
    npm config set fse_binary_host_mirror https://npmmirror.com/mirrors/fsevents/
    

    如果使用的是yarn,也可以进行相应的配置:

    yarn config set registry https://registry.npmmirror.com/
    yarn config set electron_mirror https://npmmirror.com/mirrors/electron/
    yarn config set electron_builder_binaries_mirror https://npmmirror.com/mirrors/electron-builder-binaries/
    yarn config set sqlite3_binary_host_mirror https://npmmirror.com/mirrors/sqlite3/
    yarn config set chromedriver_cdnurl https://npmmirror.com/mirrors/chromedriver/
    yarn config set operadriver_cdnurl https://npmmirror.com/mirrors/operadriver/
    yarn config set fse_binary_host_mirror https://npmmirror.com/mirrors/fsevents/
    

    相关文章

      网友评论

          本文标题:NPM淘宝源electron下载失败解决方案

          本文链接:https://www.haomeiwen.com/subject/zbbscjtx.html