Giter Club home page Giter Club logo

Comments (8)

Nick22nd avatar Nick22nd commented on June 9, 2024 2

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

from forge.

dietrich-stein avatar dietrich-stein commented on June 9, 2024

I seem to be seeing a related issue running electron-forge package --platform darwin while building on macOs.

An unhandled rejection has occurred inside Forge:
Error: /var/folders/wl/pm6gbjcn1gl79xh6vjznq7k80000gn/T/electron-packager/tmp-NNy4Lz/Electron.app/Contents/Resources/app/node_modules/@babel/helper-compilation-targets/node_modules/.bin/semver: file "../../../../../../../../../../../../var/folders/wl/pm6gbjcn1gl79xh6vjznq7k80000gn/T/electron-packager/tmp-NNy4Lz/Electron.app/Contents/Resources/app/node_modules/@babel/helper-compilation-targets/node_modules/semver/bin/semver.js" links out of the package
at Filesystem.insertLink (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/asar/lib/filesystem.js:106:13)
at handleFile (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/asar/lib/asar.js:132:20)
at next (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/asar/lib/asar.js:148:11)
at next (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/asar/lib/asar.js:149:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async MacApp.asarApp (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/packager/src/platform.ts:245:5)
at async MacApp.buildApp (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/packager/src/platform.ts:150:5)
at async MacApp.initialize (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/packager/src/platform.ts:141:7)
at async MacApp.create (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/packager/src/mac.ts:435:5)
at async Promise.all (index 0)
at async packager (/Users/dietrichstein/deepmojo-electron-vite/node_modules/@electron/packager/src/packager.ts:246:20)

Presumably, this could be reproducible on LuanRoger/electron-shadcn but I have not tried.

I tried several things including (1) a packageAfterPrune() hook trying to delete the file assuming it is being left behind due to a versioning mismatch (2) derefSymlinks: false, (3) vite-plugin-commonjs-externals, (4) optimizeDeps.exclude, (5) externalizeDepsPlugin from electron-vite. No combination of workaround using any them were fruitful for me. Currently looking at what electron-vite really has to offer as an alternative.

Edit: Reproduced the OP report using the steps provided:

An unhandled rejection has occurred inside Forge:
Error: /var/folders/wl/pm6gbjcn1gl79xh6vjznq7k80000gn/T/electron-packager/tmp-S2cbBg/Electron.app/Contents/Resources/app/node_modules/@vue/compiler-core/node_modules/.bin/parser: file "../../../../../../../../../../../../var/folders/wl/pm6gbjcn1gl79xh6vjznq7k80000gn/T/electron-packager/tmp-S2cbBg/Electron.app/Contents/Resources/app/node_modules/@babel/parser/bin/babel-parser.js" links out of the package
at Filesystem.insertLink

from forge.

188 avatar 188 commented on June 9, 2024

Is there a solution?
Now how to operate can make or package normally.
Or do you need to wait for a new release? Maybe downgrade to 7.3.0?

from forge.

tclxsr avatar tclxsr commented on June 9, 2024

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!

from forge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.