sqlectron / sqlectron-gui

A simple and lightweight SQL client desktop with cross database and platform support.
https://sqlectron.github.io/
MIT License
4.58k stars 524 forks source link

Cannot find module 'electron-devtools-installer' #637

Closed molaeiali closed 3 years ago

molaeiali commented 3 years ago

I'm getting this error when using sqlectron-1.36.0.pacman and sqlectron-gui (AUR) and sqlectron-gui-git (AUR)

Loading electron extensions...
(node:7363) UnhandledPromiseRejectionWarning: Error: Cannot find module 'electron-devtools-installer'
Require stack:
- /opt/sqlectron/resources/app.asar/out/browser/app.js
- /opt/sqlectron/resources/app.asar/out/browser/main.js
- 
    at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
    at Function.n._resolveFilename (electron/js2c/browser_init.js:261:1128)
    at Module._load (internal/modules/cjs/loader.js:732:27)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12789)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at /opt/sqlectron/resources/app.asar/out/browser/app.js:92:95
(Use `sqlectron --trace-warnings ...` to show where the warning was created)
(node:7363) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7363) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
MasterOdin commented 3 years ago

Do you have NODE_ENV === 'development' or DEV_TOOLS === 'true' set within your environment?

molaeiali commented 3 years ago

I'm a NodeJS developer myself so, Yes, NODE_ENV is development for me.

I tried it without NODE_ENV being set to development and it opens fine, but I think it should not rely on it in the final production produt?