electron / forge

:electron: A complete tool for building and publishing Electron applications
https://electronforge.io
MIT License
6.34k stars 494 forks source link

Error: Multiple plugins tried to take control of the start command, please remove one of them --> vite, fuses #3652

Open cmxela opened 1 week ago

cmxela commented 1 week ago

Pre-flight checklist

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

cmxela commented 1 week ago

This problem does not happen if instead of using 'electron-forge startI usenpm start`

yangannyx commented 1 week ago

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?

cmxela commented 3 days ago

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
    ~         ```