Skip to content
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

Issue while using Electron Forge #9

Closed
ninjadev64 opened this issue Aug 28, 2023 · 6 comments
Closed

Issue while using Electron Forge #9

ninjadev64 opened this issue Aug 28, 2023 · 6 comments

Comments

@ninjadev64
Copy link

ninjadev64 commented Aug 28, 2023

> tsc && electron-forge make

✔ Checking your system
etBuil…
  build_file_data = LoadOneBuildFile(
  File "/Users/aman/GitHub Desktop/OpenDeck/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 237, in LoadOneBuildFi…
  build_file_data = eval(build_file_contents, {"__builtins__": {}}, None)
  File "binding.gyp", line 2
  # https://github.com/electron-userland/electron-builder/issues/3938
  ^
  SyntaxError: unexpected EOF while parsing
  Error: `gyp` failed with exit code: 1
  at ChildProcess.onCpExit (/Users/aman/GitHub Desktop/OpenDeck/node_modules/node-gyp/lib/configure.js:325:16)
  at ChildProcess.emit (node:events:514:28)
  at ChildProcess._handle.onexit (node:internal/child_process:291:12)

An unhandled rejection has occurred inside Forge:
Error: node-gyp failed to rebuild '/private/var/folders/fr/6c96j67x5ps0l3wrj9ytfpkw0000gp/T/electron-packager/darwin-x64/opendeck-darwin-x64-nJ15u0/Electron.app/Contents/Resources/app/node_modules/@julusian/jpeg-turbo'
at ChildProcess.<anonymous> (/Users/aman/GitHub Desktop/OpenDeck/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js:118:24)
    at ChildProcess.emit (node:events:514:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)

I can see it mentions electron-userland/electron-builder#3938 in a file attempting to fix this error, but the workaround seems to no longer work...

@ninjadev64
Copy link
Author

Node v18.17.1
node-jpeg-turbo v2.1.0
Electron Forge v6.4.1
(@elgato-stream-deck/node v5.7.3)

@Julusian
Copy link
Owner

I think this is hitting electron/rebuild#1055

As I changed the prebuilds to be part of the npm package rather than being installed via prebuild-install in v2.0.0, maybe this hack to get electron-builder to rebuild the library is unnecessary. It does mean that cross building for any platform that prebuilds arent provided for will not work, but the chances of being able to compile the binary in that scenario is highly unlikely.

@ninjadev64
Copy link
Author

I think this is hitting electron/rebuild#1055

As I changed the prebuilds to be part of the npm package rather than being installed via prebuild-install in v2.0.0, maybe this hack to get electron-builder to rebuild the library is unnecessary. It does mean that cross building for any platform that prebuilds arent provided for will not work, but the chances of being able to compile the binary in that scenario is highly unlikely.

Oh, alright, thanks - what should I do to get my builds working again?

@Julusian
Copy link
Owner

Could you try deleting the node_modules/@julusian/jpeg-turbo/binding.gyp file in your project folder?
That will fix it short term, and will confirm that my planned solution will work for you

@ninjadev64
Copy link
Author

Could you try deleting the node_modules/@julusian/jpeg-turbo/binding.gyp file in your project folder? That will fix it short term, and will confirm that my planned solution will work for you

Seems to have fixed it, thanks!

@ninjadev64
Copy link
Author

Do let me know when the long-term solution is available as this is a minor inconvenience, having to be added as a step in CI builds and explained to others trying to build my project ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants