-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
What happened?
When using pnpm v10, it now asks to approve builds using pnpm approve-builds. Approving electron is necessary for electron to work in dev using quasar dev -m electron.
Approving dependencies will create a file called pnpm-workspace.yaml with the following content
onlyBuiltDependencies:
- electron
- esbuildWhen building using quasar build -m electron, pnpm will detect the presence of a workspace because of this newly created yaml file. When installing the production node_modules inside dist/electron/UnPackaged, pnpm will try to install the node_modules at the project root instead of inside this sub-directory. Doing so, pnpm will first purge the exisiting node_modules, and the build will fail.
The workaround is to add --ignore-workspace in the pnpm install --prod command.
What did you expect to happen?
The build should succeed.
Reproduction URL
https://github.com/philfontaine/quasar-pnpm-workspace-bug
How to reproduce?
- Clone the repo. It was built using
quasar createthen adding electron mode. - Run
quasar build -m electron
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Electron Mode
Platforms/Browsers
Electron
Quasar info output
Relevant log output
Additional context
No response