You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make an app using electron-forge and I have an error from terser-webpack-plugin. I can start my app but I can't run a make. My project is based on this template, based itself on the electron-forgeWebpack+Typescript template
Actual Behavior
$ electron-forge package --platform linux
✔ Checking your system
✖ Compiling Main Process Code
An unhandled error has occurred inside Forge:
Compilation errors in the main process: assets by status 9.41 MiB [cached] 7 assets
1712 modules
ERROR in native_modules/node-gyp1.js
native_modules/node-gyp1.js from Terser plugin
'return' outside of function[native_modules/node-gyp1.js:45,2]
at js_error (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:550:11)
at croak (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1274:9)
at statement (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1477:21)
at _embed_tokens_wrapper (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1339:26)
at block_ (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:2172:20)
at statement (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1403:29)
at _embed_tokens_wrapper (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1339:26)
at if_ (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:2155:44)
at statement (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1473:24)
at _embed_tokens_wrapper (/mnt/datadev/perso/myapp/node_modules/terser-webpack-plugin/node_modules/terser/dist/bundle.min.js:1339:26)
webpack 5.39.1 compiled with 1 error in 18683 ms
at cb (/mnt/datadev/perso/myapp/node_modules/@electron-forge/plugin-webpack/src/WebpackPlugin.ts:252:31)
at finalCallback (/mnt/datadev/perso/myapp/node_modules/webpack/lib/Compiler.js:415:32)
at /mnt/datadev/perso/myapp/node_modules/webpack/lib/Compiler.js:432:13
at Hook.eval [as callAsync] (eval at create (/mnt/datadev/perso/myapp/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/mnt/datadev/perso/myapp/node_modules/tapable/lib/Hook.js:18:14)
at onCompiled (/mnt/datadev/perso/myapp/node_modules/webpack/lib/Compiler.js:430:21)
at /mnt/datadev/perso/myapp/node_modules/webpack/lib/Compiler.js:1106:17
at Hook.eval [as callAsync] (eval at create (/mnt/datadev/perso/myapp/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/mnt/datadev/perso/myapp/node_modules/tapable/lib/Hook.js:18:14)
at /mnt/datadev/perso/myapp/node_modules/webpack/lib/Compiler.js:1102:33
at finalCallback (/mnt/datadev/perso/myapp/node_modules/webpack/lib/Compilation.js:2249:11)
at /mnt/datadev/perso/myapp/node_modules/webpack/lib/Compilation.js:2540:11
at Hook.eval [as callAsync] (eval at create (/mnt/datadev/perso/myapp/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/mnt/datadev/perso/myapp/node_modules/tapable/lib/Hook.js:18:14)
at /mnt/datadev/perso/myapp/node_modules/webpack/lib/Compilation.js:2533:38
at eval (eval at create (/mnt/datadev/perso/myapp/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:17:1)
error Command failed with exit code 1.
The make process should complete, I'm sorry I don't know much about terser-webpack-plugin in particular.
How Do We Reproduce?
This is the tricky part. I made a new project using the electron-forge Webpack+Typescript template and added the native modules (sqlite3, @journeyapps/sqlcipher) and everything works perfectly.
I am currently unable to reproduce this outside of my working project. If you have time to investigate, here is the project, the branch to clone is wip_distribute2.
Please paste the results of npx webpack-cli info here, and mention other relevant information
I obviously took a close look at the issue #281 but nothing mentioned here works. The issue is also pretty old and concerned old versions.
The version requested by my dependencies is 5.1.1 ; I tried to pin 5.3.0 but the same error occurs.
I also tried to pin terser version, without success.
The text was updated successfully, but these errors were encountered:
I spent nearly an hour looking for this file, but I couldn't find it. Not in the node_modules, not in the out folder, I don't understand where it can be.
Bug report
I am trying to make an app using electron-forge and I have an error from terser-webpack-plugin. I can start my app but I can't run a make. My project is based on this template, based itself on the electron-forge Webpack+Typescript template
Actual Behavior
Here is my package.json dependencies:
Expected Behavior
The make process should complete, I'm sorry I don't know much about terser-webpack-plugin in particular.
How Do We Reproduce?
This is the tricky part. I made a new project using the electron-forge Webpack+Typescript template and added the native modules (sqlite3, @journeyapps/sqlcipher) and everything works perfectly.
I am currently unable to reproduce this outside of my working project. If you have time to investigate, here is the project, the branch to clone is wip_distribute2.
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationI obviously took a close look at the issue #281 but nothing mentioned here works. The issue is also pretty old and concerned old versions.
The version requested by my dependencies is 5.1.1 ; I tried to pin 5.3.0 but the same error occurs.
I also tried to pin terser version, without success.
The text was updated successfully, but these errors were encountered: