electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.7k stars 1.74k forks source link

electron-builder build and install, run with error Cannot read property '_android' of undefined #7881

Closed wuhaodes closed 1 year ago

wuhaodes commented 1 year ago

"vue-cli-plugin-electron-builder": "~2.1.1", "electron": "^13.0.0", "electron-devtools-installer": "^3.1.0", "vue": "2.6.12", node -v // v16.18.0 Target: win32

a old vue management item, use vue add electron-builder and select electron@13.0, when add finished, run electron:serve, it's run very well; and run electron:build, the exe file has been output; but when install this file, and run, it's export the error [Cannot read property '_android' of undefined]

mmaietta commented 1 year ago

That's an error in your code, _android isn't anywhere in the electron-builder codebase. Also, I'm not sure what version of electron-builder the vue-cli plugin is using, I'd recommend using a direct implementation of electron-builder if it isn't on the most recent versions of electron-builder.

wuhaodes commented 1 year ago

can I use electon-builder directly to transform a old Vue project to Desketop app, I will try use it directly

wuhaodes commented 1 year ago

I think this error is caused by the window or dom can't be reached, which cause the other dependencies can't run correctly

wuhaodes commented 1 year ago

may be the vue-cli-plugin-electron-builder used too old electron builder

wuhaodes commented 1 year ago

image I see the the vue-cli-plugin-electron-builder use the version ^22.2.0 electron-builder

wuhaodes commented 1 year ago

image I have installed the electron-builder directly, but find it's only two big version gap of generations

wuhaodes commented 1 year ago

image I find this error was poped by qrcodejs2, I will try to remove it

wuhaodes commented 1 year ago

when I removed qrcodejs2, it's worked