-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Description
Description:
When attempting to integrate Vue 3 into an Electron Forge project created with Vite and TypeScript, using pnpm
as the package manager and with the npm configuration node-linker=hoisted
set, the application fails to start and throws an error related to Electron installation. This issue appears to be specifically triggered by the combination of these technologies and configurations.
Environment Information
- Operating System: Windows 11
- Node.js Version: v22.14.0
- npm Version: 10.9.2
- pnpm Version: 10.4.1
- Electron Forge Version: ^7.7.0
- Vite Version: ^5.4.14
- Vue Version: ^3.5.13
- TypeScript Version: ~4.5.4
Reproduction Steps
-
Create Electron Forge project:
npx create-electron-app@latest my-vue-app --template=vite+typescript
-
Navigate to the project directory:
cd my-vue-app
-
Set npm configuration
node-linker=hoisted
: -
Integrate Vue 3:
- Followed the official Electron Forge Vue 3 integration guide: https://www.electronforge.io/guides/framework-integration/vue-3
-
Run the application:
pnpm run start # Or the command you used to start the application
Error Message
An unhandled rejection has occurred inside Forge:
Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (F:\code\person\bill\node_modules\electron\index.js:17:11)
at Object.<anonymous> (F:\code\person\bill\node_modules\electron\index.js:21:18)
at Module._compile (node:internal/modules/cjs/loader:1554:14)
at node:internal/modules/cjs/loader:1706:10
at Object.require.extensions.<computed> [as .js] (F:\code\person\bill\node_modules\ts-node\src\index.ts:1608:43)
at Module.load (node:internal/modules/cjs/loader:1289:32)
at Function._load (node:internal/modules/cjs/loader:1108:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
at Module.require (node:internal/modules/cjs/loader:1311:12)
at require (node:internal/modules/helpers:136:16)
at locateElectronExecutable (F:\code\person\bill\node_modules\@electron-forge\core\src\util\electron-executable.ts:12:26)
at async forgeSpawn (F:\code\person\bill\node_modules\@electron-forge\core\src\api\start.ts:166:28)
at async forgeSpawnWrapper (F:\code\person\bill\node_modules\@electron-forge\core\src\api\start.ts:209:23)
at async F:\code\person\bill\node_modules\@electron-forge\core\src\api\start.ts:244:21
at async F:\code\person\bill\node_modules\@electron-forge\tracer\src\index.ts:51:14
Metadata
Metadata
Assignees
Labels
No labels