当前位置:   article > 正文

【Electron】electron-builder打包失败问题记录_wincodesign-2.6.0.7z

wincodesign-2.6.0.7z

yarn下载的包不支持require()

报错内容:

var stringWidth = require('string-width')
                  ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /stuff/node_modules/string-width/index.js from /stuff/node_modules/wide-align/align.js not supported.
Instead change the require of index.js in /stuff/node_modules/wide-align/align.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/stuff/node_modules/wide-align/align.js:2:19)
    at Object.<anonymous> (/stuff/node_modules/gauge/render-template.js:2:13)
    at Object.<anonymous> (/stuff/node_modules/gauge/plumbing.js:3:22)
    at Object.<anonymous> (/stuff/node_modules/gauge/index.js:2:16)
    at Object.<anonymous> (/stuff/node_modules/npmlog/log.js:3:13)
    at Object.<anonymous> (/stuff/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:23:13)
    at Object.<anonymous> (/stuff/node_modules/@mapbox/node-pre-gyp/lib/main.js:9:22)
    at Object.<anonymous> (/stuff/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp:4:1) {
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

github issue

https://github.com/isaacs/jackspeak/issues/5
  • 1

解决方法:
不用yarn下载,改用npm

winCodeSign-2.6.0.7z下载失败

https://registry.npmmirror.com/binary.html?path=electron-builder-binaries/winCodeSign-2.6.0/
  • 1

下载后找到以下位置,将压缩包解压到electron-builder的cache文件夹中

C:\Users\admin\AppData\Local\electron-builder\Cache
  • 1

在这里插入图片描述

nsis-3.0.4.1.7z下载失败

https://registry.npmmirror.com/binary.html?path=electron-builder-binaries/nsis-3.0.4.1/
  • 1

下载后找到以下位置,将压缩包解压到electron-builder的cache文件夹中

C:\Users\admin\AppData\Local\electron-builder\Cache\nsis
  • 1

在这里插入图片描述

待补充…

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/761261
推荐阅读
相关标签
  

闽ICP备14008679号