Can’t find a way to start my first electron app. I looked up on internet but nothing seems to work for me.
- Opening Electron platform
- Opening Electron platform: start
Opening Electron platform: start- Opening Electron platform: builing electron app
Opening Electron platform: builing electron app- Opening Electron platform: running electron app
Error: undefined
Opening Electron platform:
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise whic
h was not handled with .catch(). The promise rejected with the reason "capacitor-app@1.0.0 electron:start-live
node ./live-runner.jsnode:internal/modules/cjs/loader:936
throw err;
^Error: Cannot find module ‘chokidar’
Require stack:
- C:\Users\Fractal\Documents\Wappler\melilliprints\electron\live-runner.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\Fractal\Documents\Wappler\melilliprints\electron\live-runner.js:4:18)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
code: ‘MODULE_NOT_FOUND’,
requireStack: [
‘C:\Users\Fractal\Documents\Wappler\melilliprints\electron\live-runner.js’
]
}
".] {
code: ‘ERR_UNHANDLED_REJECTION’
}
Update: I also noticed, if I try to build the app, it throws another error.
capacitor-app@1.0.0 build
tsc && electron-rebuildsrc/index.ts:6:23 - error TS2307: Cannot find module ‘electron-unhandled’ or its corresponding type declarations.
6 import unhandled from ‘electron-unhandled’;
~~~~~~~~~~~~~~~~~~~~src/index.ts:7:29 - error TS2307: Cannot find module ‘electron-updater’ or its corresponding type declarations.
7 import { autoUpdater } from ‘electron-updater’;
~~~~~~~~~~~~~~~~~~src/setup.ts:7:22 - error TS2307: Cannot find module ‘chokidar’ or its corresponding type declarations.
7 import chokidar from ‘chokidar’;
~~~~~~~~~~src/setup.ts:11:27 - error TS2307: Cannot find module ‘electron-serve’ or its corresponding type declarations.
11 import electronServe from ‘electron-serve’;
~~~~~~~~~~~~~~~~src/setup.ts:12:31 - error TS2307: Cannot find module ‘electron-window-state’ or its corresponding type declarations.
12 import windowStateKeeper from ‘electron-window-state’;
…/node_modules/@capacitor-community/electron/dist/core/util.d.ts:1:23 - error TS4090: Conflicting definitions for ‘node’ found at ‘C:/Users/Fractal/D
ocuments/Wappler/melilliprints/node_modules/@types/node/ts4.8/index.d.ts’ and ‘C:/Users/Fractal/Documents/Wappler/melilliprints/node_modules/electron/
node_modules/@types/node/ts4.8/index.d.ts’. Consider installing a specific version of this library to resolve the conflict.
The file is in the program because:
Type library referenced via ‘node’ from file ‘C:/Users/Fractal/Documents/Wappler/melilliprints/node_modules/electron/electron.d.ts’ with packageId
‘@types/node/ts4.8/index.d.ts@16.18.3’
Type library referenced via ‘node’ from file ‘C:/Users/Fractal/Documents/Wappler/melilliprints/node_modules/@capacitor-community/electron/dist/cor
e/util.d.ts’ with packageId ‘@types/node/ts4.8/index.d.ts@18.11.8’1 ///
~~~~…/node_modules/electron/electron.d.ts:6:23
6 ///
~~~~
File is included via type library reference here.Found 6 errors in 3 files.
Errors Files
2 src/index.ts:6
3 src/setup.ts:7
1 …/node_modules/@capacitor-commun
Last updated: