Open NickNothom opened 2 years ago
Have you added Electron mode before trying anything further with quasar mode add electron
?
Yes.
same problem here
I'm seeing similar problems when using node 16.13.1 that go away when I bump to 16.15.1 via nvm.
Edit: take this with a grain of salt - I'm not able to reliably reproduce the issue
check whether electron module installed under the node_modules
quasar mode add electron will install
@snowwolfjay I think you're right and that electron should have been added to package.json
by quasar build -m electron
.
I'm thinking the root cause was likely fixed by https://github.com/quasarframework/quasar/commit/b7dff677813094654a5da0d02ccef8ecb3b8acd2.
What happened?
I started a fresh project with
npm init quasar
, accepted all of the defaults (except choosing Vite).quasar dev
worksquasar build
worksquasar dev -m electron
worksBut
quasar build -m electron
crashes, and after that the quasar command is completely broken until I runnpm install
again.After this, running
quasar
gives:Until I
npm install
/yarn
I injected a few other lines here to test getPackageJson() with other package names, and it isn't able to resolve any of them. It always falls into this catch block.
I get the same results with npm and yarn. I get the same error with
builder
instead ofpackager
except it fails on L132 instead of L130.What did you expect to happen?
The electron app would be built.
Reproduction URL
https://github.com/NickNothom/quasar-cli-vite-electron-bug
How to reproduce?
yarn create quasar
/npm init quasar
cd quasar-project
quasar build -m electron
/yarn quasar build -m electron
/npx quasar build -m electron
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), Electron Mode
Platforms/Browsers
No response
Quasar info output
Relevant log output
No response
Additional context
No response