yarn compile && electron-builder (I'm using vue electron), I keep getting a window with the following error when trying to run the app:A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'source-map-support/register'
at Module._resolveFilename (module.js:470:15)
at Function.Module._resolveFilename (~/.../build/My.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (~/.../build/My.app/Contents/Resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:12:1)
at Object.<anonymous> (~/.../build/My.app/Contents/Resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:438:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
The app runs fine after clicking the OK button. But it is very annoying.
yarn add source-map-support
I should have told you that I already have installed source-map-support.
Please show your electron builder config.
I got it working by installing electron-builder as dev dependency. I was curious why it wasn't working. I had source-map-support installed as a regular non-dev dependency.
Most helpful comment
yarn add source-map-support