LuanRoger / electron-shadcn

:electron: Electron Forge with shadcn-ui (Vite + Typescript)
MIT License
113 stars 16 forks source link

Error: Multiple plugins tried to take control of the start command #71

Closed codinginbarn closed 11 hours ago

codinginbarn commented 13 hours ago

Started with git command and git bash. Then moved to PS, same issue.

On win 10 pro with Node 20.17.0.

Fairly new Electron user, so not sure how to proceed?

PS C:\Projects-Temp\electron-shadcn-main> npm install
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated gar@1.0.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated xterm-addon-search@0.8.2: This package is now deprecated. Move to @xterm/addon-search instead.
npm warn deprecated domexception@4.0.0: Use your platform's native DOMException instead
npm warn deprecated xterm-addon-fit@0.5.0: This package is now deprecated. Move to @xterm/addon-fit instead.
npm warn deprecated asar@3.2.0: Please use @electron/asar moving forward.  There is no API change, just a package name change
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated xterm@4.19.0: This package is now deprecated. Move to @xterm/xterm instead.
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     'C:\\Projects-Temp\\electron-shadcn-main\\node_modules\\electron-installer-debian\\node_modules\\yargs',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Projects-Temp\electron-shadcn-main\node_modules\electron-installer-debian\node_modules\yargs\build'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Projects-Temp\\electron-shadcn-main\\node_modules\\electron-installer-debian\\node_modules\\yargs\\build'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]

added 1163 packages, and audited 1164 packages in 47s

196 packages are looking for funding
  run `npm fund` for details

6 vulnerabilities (2 moderate, 4 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
PS C:\Projects-Temp\electron-shadcn-main> npm run start

> electron-shadcn@1.0.0 start
> electron-forge start

√ Checking your system
√ Locating application
√ Loading configuration
√ Preparing native dependencies [2s]
√ 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 (C:\Projects-Temp\electron-shadcn-main\node_modules\@electron-forge\core\src\util\plugin-interface.ts:150:13)
    at forgeSpawn (C:\Projects-Temp\electron-shadcn-main\node_modules\@electron-forge\core\src\api\start.ts:128:66)
    at forgeSpawnWrapper (C:\Projects-Temp\electron-shadcn-main\node_modules\@electron-forge\core\src\api\start.ts:200:29)
    at C:\Projects-Temp\electron-shadcn-main\node_modules\@electron-forge\core\src\api\start.ts:235:27
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async C:\Projects-Temp\electron-shadcn-main\node_modules\@electron-forge\tracer\src\index.ts:51:14
    at async C:\Projects-Temp\electron-shadcn-main\node_modules\@electron-forge\cli\src\electron-forge-start.ts:61:19
PS C:\Projects-Temp\electron-shadcn-main>
4ban commented 12 hours ago

Same error on Mac 14. Node 22.2.0:

> electron-shadcn@1.0.0 start
> electron-forge start

✔ Checking your system
✔ Locating application
✔ Loading configuration
✔ Preparing native dependencies [0.2s]
✔ 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 (/Users/ban/code/_reference/electron-shadcn/node_modules/@electron-forge/core/src/util/plugin-interface.ts:150:13)
    at forgeSpawn (/Users/ban/code/_reference/electron-shadcn/node_modules/@electron-forge/core/src/api/start.ts:128:66)
    at forgeSpawnWrapper (/Users/ban/code/_reference/electron-shadcn/node_modules/@electron-forge/core/src/api/start.ts:200:29)
    at /Users/ban/code/_reference/electron-shadcn/node_modules/@electron-forge/core/src/api/start.ts:235:27
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/ban/code/_reference/electron-shadcn/node_modules/@electron-forge/tracer/src/index.ts:51:14
    at async /Users/ban/code/_reference/electron-shadcn/node_modules/@electron-forge/cli/src/electron-forge-start.ts:61:19
LuanRoger commented 11 hours ago

Hello, thanks for reporting the problem.

I've just check the issue and it's really happen, seems that the issue is related to the project's dependencies, probably introduced by dependabot.

Try to update the dependencies by running:

npm upgrade --save

After that, install the dependencies again:

npm i

I've tried this and seems to resolve, can you please check if this solve the problem.

codinginbarn commented 11 hours ago

That fixed the issue.

Sometimes I love dependabot and other times not so much :)

Thank you!