1

I am currently trying to package my electron app for the first time, and I am encountering a weird bug.

When launching the app.exe, this error message appears :

Uncaught Exception:
C:\ .... \build\main.js:39
electron_1.app.on("ready", async () => {

SyntaxError: Unexpected token (
at Object.export.runInThisContext (vm.js:76:16)
at ...

The arrow points at the parenthesis right after app.on.

The app is compiled from typescript to js with tsc (not that this would affect the final result I suppose), then packed with

electron-packager . testApp --platform=win32 --arch=x64 --electron-version=1.4.3

Any help would be appreciated, as I am really stumped by this error.

dododingo
  • 79
  • 7

1 Answers1

1

Ok, so turns out the command I was using to package the app was specifying an electron version (unnecessary) different from the one I used. Removing the specific version from the command line fixed it.

dododingo
  • 79
  • 7