Error: Multiple plugins tried to take control of the start command, please remove one of them --> vite, fuses
Pre-flight checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
7.4.0
Electron version
31.1.0
Operating system
Fedora Linux 40
Last known working Electron Forge version
No response
Expected behavior
being able to start the application just after creating it from a template
Actual behavior
executing electron-forge start just after executing
npm init electron-app@latest gato-vue -- --template=vite-typescript
is producing this output
✔ Checking your system
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies [0.1s]
✔ Running generateAssets hook
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
An unhandled rejection has occurred inside Forge:
Error: Multiple plugins tried to take control of the start command, please remove one of them
--> vite, fuses
at PluginInterface.overrideStartLogic (/home/alexmc/.local/share/nvm/v22.3.0/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/src/util/plugin-interface.ts:150:13)
at forgeSpawn (/home/alexmc/.local/share/nvm/v22.3.0/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/src/api/start.ts:128:66)
at forgeSpawnWrapper (/home/alexmc/.local/share/nvm/v22.3.0/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/src/api/start.ts:200:29)
at /home/alexmc/.local/share/nvm/v22.3.0/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/core/src/api/start.ts:235:27
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /home/alexmc/.local/share/nvm/v22.3.0/lib/node_modules/@electron-forge/cli/node_modules/@electron-forge/tracer/src/index.ts:51:14
at async /home/alexmc/.local/share/nvm/v22.3.0/lib/node_modules/@electron-forge/cli/src/electron-forge-start.ts:61:19
Steps to reproduce
described in the actual behaviour
Additional information
No response
This problem does not happen if instead of using 'electron-forge startI usenpm start`
Hey @cmxela! My guess it that the version of electron forge you're hitting when you run electron-forge start is out of date with the version of forge in your dev dependencies. Can you verify if that's the case by running npx electron-forge --version in /gato-vue and running npx electron-forge --version from your home dir and comparing the outputted versions?
Hi @yangannyx thanks for your reply, no, this is not the case
~/gato/gato/gato-frontend master !279 ?6 npx electron-forge --version ✘ 1
✔ Checking your system
7.4.0
~/gato/gato/gato-frontend master !279 ?6 cd ✔
~ npx electron-forge --version ✔
✔ Checking your system
7.4.0
~ ```
I got the same problem, in my case it was caused by npm installing @electron-forge/plugin-base inside both @electron-forge/plugin-fuses and @electron-forge/core instead of hoisting it, which caused problems with how electron detects if plugins have implemented the startLogic function (the prototype wasn't identical).
I solved it by adding and then removing @electron-forge/plugin-base, which probably cleaned up my lockfile.
I think I got the same. Windows, just created a new project with this
npm init electron-app@latest electrontstest -- --template=webpack-typescript
and then simply
npx electron-forge start
error I've got:
An unhandled rejection has occurred inside Forge:
Error: Multiple plugins tried to take control of the start command, please remove one of them
--> auto-unpack-natives, webpack, fuses
at PluginInterface.overrideStartLogic (C:\Users\ProjectC\electrontstest\node_modules@electron-forge\core\src\util\plugin-interface.ts:150:13)
at forgeSpawn (C:\Users\ProjectC\electrontstest\node_modules@electron-forge\core\src\api\start.ts:128:66)
at forgeSpawnWrapper (C:\Users\ProjectC\electrontstest\node_modules@electron-forge\core\src\api\start.ts:200:29)
at C:\Users\ProjectC\electrontstest\node_modules@electron-forge\core\src\api\start.ts:235:27
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async C:\Users\ProjectC\electrontstest\node_modules@electron-forge\tracer\src\index.ts:51:14
at async C:\Users\ProjectC\electrontstest\node_modules@electron-forge\cli\src\electron-forge-start.ts:61:19
@shawhu I have the exact same error you've got. Did you find any solutions? I'm very new to TS-electron projects.
I encountered this issue when adding @electron-forge/plugin-fuses and @electron-forge/plugin-vite to my project in the same npm install command.
I was able to fix the error by removing the plugins, then npm install-ing them one at a time..
I encountered this issue when adding
@electron-forge/plugin-fusesand@electron-forge/plugin-viteto my project in the same npm install command.I was able to fix the error by removing the plugins, then npm install-ing them one at a time..
I had been trying to do the same, but it didn't work. I remove the packages from package.json, run npm install, then add one by one, run npm install, in any order the result is the same.
For future reference for anyone: I found I had this same issue however the reason being seems to have been because the vite plugin and the fuses plugin were both on different versions (one on 7.4.0 and one on 7.5.0). Updating them both to 7.5.0 fixed this.
^ making sure all your electron-forge deps are the same version worked for me
I think I'm going to close this since the solution just seems to be keeping all package versions up to date with each other.
There's potentially a follow-up to be made to warn users if mismatched versions are detected?