-
-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error is reported after vue is imported #3548
Comments
I seem to be seeing a related issue running An unhandled rejection has occurred inside Forge: Presumably, this could be reproducible on I tried several things including (1) a Edit: Reproduced the OP report using the steps provided:
|
Is there a solution? |
I encountered the same issue(links out of the package), and I resolved it by removing yarn.lock and node_modules. Switch to npm: rm -rf node_modules yarn.lock
npm i |
Its worked for me! |
After many tests, the problem was found, as long as the vue was introduced and then packaged, the error was reported, and there was no problem when the vue was removed. Is there any feasible solution? |
https://www.electronforge.io/guides/framework-integration/vue-3#integrating-vue-3-code |
God can help with that. Thank you |
Hi, I believe this was fixed upstream in electron/asar#308. Please upgrade asar in your lockfiles to the latest version! I also recommend only using a single package manager for running the Forge executable and your install commands, as that may have had some impact as per #3548 (comment). |
Pre-flight checklist
Electron Forge version
7.3.1
Electron version
29.1.5
Operating system
macOS 14.3.1
Last known working Electron Forge version
No response
Expected behavior
yarn make can run properly with no error reported:
Actual behavior
yarn run v1.22.19
$ electron-forge package
✔ Checking your system
⠙ Preparing to package application
◼ Running packaging hooks
✔ Preparing to package application
❯ Running packaging hooks
✔ Running generateAssets hook
✔ Preparing to package application
❯ Running packaging hooks
✔ Running generateAssets hook
❯ Running prePackage hook
⠸ [plugin-vite] Building vite bundles
◼ Packaging application
◼ Running postPackage hook
✔ Preparing to package application
✔ Preparing to package application
❯ Running packaging hooks
✔ Running generateAssets hook
❯ Running prePackage hook
✔ Preparing to package application
✔ Running packaging hooks
✔ Running generateAssets hook
✔ Running prePackage hook
✔ [plugin-vite] Building vite bundles
❯ Packaging application
❯ Packaging for arm64 on darwin
✔ Copying files
✔ Preparing native dependencies [0.5s]
✖ Finalizing package
› /var/folders/f3/_c8y2b7575gb8zwp0k3fy4cc0000gn/T/electron-packager/tmp-LAvMjM/Electron.app/Contents/Resources/a…
◼ Running postPackage hook
An unhandled rejection has occurred inside Forge:
Error: /var/folders/f3/_c8y2b7575gb8zwp0k3fy4cc0000gn/T/electron-packager/tmp-LAvMjM/Electron.app/Contents/Resources/app/node_modules/@vue/compiler-core/node_modules/.bin/parser: file "../../../../../../../../../../../../var/folders/f3/_c8y2b7575gb8zwp0k3fy4cc0000gn/T/electron-packager/tmp-LAvMjM/Electron.app/Contents/Resources/app/node_modules/@babel/parser/bin/babel-parser.js" links out of the package
at Filesystem.insertLink (/Users/steven/data/test/my-new-app21/node_modules/@electron/asar/lib/filesystem.js:106:13)
at handleFile (/Users/steven/data/test/my-new-app21/node_modules/@electron/asar/lib/asar.js:132:20)
at next (/Users/steven/data/test/my-new-app21/node_modules/@electron/asar/lib/asar.js:148:11)
at next (/Users/steven/data/test/my-new-app21/node_modules/@electron/asar/lib/asar.js:149:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async MacApp.asarApp (/Users/steven/data/test/my-new-app21/node_modules/@electron/packager/src/platform.ts:245:5)
at async MacApp.buildApp (/Users/steven/data/test/my-new-app21/node_modules/@electron/packager/src/platform.ts:150:5)
at async MacApp.initialize (/Users/steven/data/test/my-new-app21/node_modules/@electron/packager/src/platform.ts:141:7)
at async MacApp.create (/Users/steven/data/test/my-new-app21/node_modules/@electron/packager/src/mac.ts:435:5)
at async Promise.all (index 0)
at async packager (/Users/steven/data/test/my-new-app21/node_modules/@electron/packager/src/packager.ts:246:20)
error Command failed with exit code 1.
Steps to reproduce
1、npm init electron-app@latest my-vue-app -- --template=vite
2、npm install vue
3、npm install --save-dev @vitejs/plugin-vue
4、yarn
5、yarn make
Additional information
No response
The text was updated successfully, but these errors were encountered: