1

I have a strange issue working on PoC application. It is an Electron app using Angular 7 and Ionic 4. It's very simple, just two routes, one fake service and not much going on there.

In package.json I have defined following scripts:

"electron:serve": "electron . --serve",
"electron:transpile": "webpack ./electron/src/main.ts --config ./electron/webpack.electron.config.js",
"build:electron": "npm run electron:transpile && npm run build:web && electron-builder build"

Folder structure is as follows:

poc-client
+- dist
   +- ...
+- electron
   +- dist
   +- src
   +- tsconfig.json
   +- webpack.electron.config.js
+- src
   +- ...
+- package.json

Now wen I run build:electron it builds the app, generates executable in dist folder and everything works as expected. But when I run electron:serve Electron starts but I'll get the following error:

Error

Console in VS Code shows no error when running the script neither there are any issues shown in Chromium Dev Tools. I found this, but it's not the case, I tried adding fake package.json to electron folder but with no effect. I'm running out of ideas, what to do.

mat.hudak
  • 2,803
  • 2
  • 24
  • 39

1 Answers1

1

it looks like you are serving in your dist directory but looking for a package.json file in your root directory.

null4bl3
  • 21
  • 7