Electron build error with Bun and pnpm because of package.json and lockfile mismatch #17085
Labels
area/cli
bug/1-hard-to-reproduce
A reproduction is available, but it's hard to reproduce, so it has a lower priority.
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
mode/electron
Qv2 🔝
Quasar v2 issues
What happened?
When building for electron, a new package.json file is created and copied to the
UnPackaged
which only contains thedependencies
, i.e. without thedevDependencies
.The lockfile is also copied to that folder.
When running
bun install
orpnpm install
, there will be a mismatch between the newpackage.json
and the lockfile since the devDependencies are included in the lockfile, but are not found in thepackage.json
.This is my workaround:
Note: in PNPM it only fails in the CI since the
--frozen-lockfile
is only set by default if it detects a CI environment. In Bun, it also fails locally since--frozen-lockfile
is set by default.What did you expect to happen?
The workaround is implemented inside quasar so there are no build error by default.
Note: The workaround is not perfect, we indeed would normally want the lockfile to be frozen, especially in the CI. But it seems impossible because of the mismatch.
Reproduction URL
https://github.com/philfontaine/quasar-bug-electron-build-bun-pnpm
How to reproduce?
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
Electron
Quasar info output
No response
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: