You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After migrating to a turborepo project, an error occurs after the application is installed and launched,but it's basically fine in development mode.
#665
Open
4 tasks done
picasuo opened this issue
Nov 20, 2024
· 3 comments
The relevant configuration before the project was migrated:
electron.vite.config.ts
electron-builder.yml
.npmrc
Some adjustments made after the project migration, and some related configurations in turborepo
Steps for reproducing the problem
copy the electron project directly to the turborepo project's apps/mindcraft-app ,name in package.json of electron project is medcraft-desktop-reborn.
use rm -rf node_modules in the turborepo root directory to remove all sub-project dependencies.then use pnpm install to install all project dependencies, including the electron project.
started electron app development mode using pnpm turbo run dev -filter=medcraft-desktop-reborn. everything works fine in development mode.
use pnpm turbo build:mac -filter=medcraft-desktop-reborn to build the installer, the build process reported no errors. When the installation is complete and the application is launched, an error popup appears, as shown below. The package hints for the error are electron-store, electron-updater. There is a strange phenomenon: the size of the app moved to /Applications has become significantly smaller, the previous one had more than 400MB, and now it's only more than 300MB.
based on the error message, I found the relevant answer 35.I took the advice and externalized some commonjs packages in the main module of elecron.vite.config.ts and then got the different error,as shown below. so I am particularly confused now. Is the problem I encountered related to the management method of pnpm workspace package? should I not adopt the answer to the above issue?
The post should have been posted in the discussion forum, but I see that the answers are not very positive over there, so all help is sought in the issue forum, so please forgive me.
@picasuo did you find a solution? I am thinking of using electron-vite with turborepo as well
No, I think it's the way pnpm symbolically connects that causes problems with some of the older packages. Maybe you could try another package manager and see.Anyway, in the end I didn't migrate the electron project to the turbo repository, I added a web project directly to the electron-vite project.
Describe the bug
The relevant configuration before the project was migrated:
Some adjustments made after the project migration, and some related configurations in turborepo
Steps for reproducing the problem
copy the electron project directly to the turborepo project's
apps/mindcraft-app
,name
inpackage.json
of electron project ismedcraft-desktop-reborn
.use
rm -rf node_modules
in the turborepo root directory to remove all sub-project dependencies.then usepnpm install
to install all project dependencies, including the electron project.started electron app development mode using
pnpm turbo run dev -filter=medcraft-desktop-reborn
. everything works fine in development mode.use
pnpm turbo build:mac -filter=medcraft-desktop-reborn
to build the installer, the build process reported no errors. When the installation is complete and the application is launched, an error popup appears, as shown below. The package hints for the error are electron-store, electron-updater. There is a strange phenomenon: the size of the app moved to /Applications has become significantly smaller, the previous one had more than 400MB, and now it's only more than 300MB.elecron.vite.config.ts
and then got the different error,as shown below. so I am particularly confused now. Is the problem I encountered related to the management method ofpnpm workspace
package? should I not adopt the answer to the above issue?The post should have been posted in the
discussion
forum, but I see that the answers are not very positive over there, so all help is sought in theissue forum
, so please forgive me.Electron-Vite Version
2.0.0
Electron Version
28.2.0
Vite Version
5.0.12
Validations
The text was updated successfully, but these errors were encountered: