electron的部署以及配置
如果使用的是pnpm,请先配置一下镜像,否则会安装失败的:
pnpm config set registry=https://registry.npmmirror.com
pnpm config set electron_mirror=https://cdn.npmmirror.com/binaries/electron/
pnpm config set electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/
如果是npm,其实也一样的,
npm config set registry=https://registry.npmmirror.com
npm config set electron_mirror=https://cdn.npmmirror.com/binaries/electron/
npm config set electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/
不过你也有另外一个选择:
文章来源:https://www.toymoban.com/news/detail-831352.html
添加
.npmrc文件,内容如下:文章来源地址https://www.toymoban.com/news/detail-831352.html
registry=https://registry.npmmirror.com
electron_mirror=https://cdn.npmmirror.com/binaries/electron/
electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/
到了这里,关于electron桌面开发相关注意点的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!