MarshallOfSound / electron-devtools-installer

An easy way to ensure Chrome DevTools extensions into Electron
MIT License
1.11k stars 136 forks source link

Uncaught Exception: Error: Cannot find module 'electron-devtools-installer' #241

Open ScubaDrew opened 11 months ago

ScubaDrew commented 11 months ago

Following the install directions:

npm install electron-devtools-installer --save-dev

Works like a charm.

However, when we built our electron app in production mode, then we get the following error when we launched the app:

`A JavaScript error occurred in the main process

Uncaught Exception:
Error: Cannot find module 'electron-devtools-installer'
Require stack:
- /Applications/CCC.app/Contents/Resources/app.asar/build/electron/main.js

How can we get our app to have electron-devtools-installer to work when we are developing locally but not break things when we do production builds?

Thanks!

xBiei commented 11 months ago

May I see the code containing the installExtension Function?