I have developed an application with react and electron and used typescript. My file directory is as follows. In my index.tsx file, there is the classic index.tsx file content from React. My app is running smoothly. I want to run my application on all platforms and I use electron packager for this, but it throws me an error like "The main entry point to your app was not found. Make sure "index.js" exists and does not get ignored by your ignore option"
I have faced same issue and solved by using below steps.
npm install @capacitor/core@1.5.3
npm install @capacitor/cli@1.5.3 --save-dev
npx cap init
Open angular.json file and change output dir by default to “www”.
"outputPath": "dist/smart-accounting-book",
ng build --prod
npx cap add electron
Go to file:
electron→ app → index.html and change href=”/” to href=”./”
electron→ index.js and make below changes to isDevMode, i.e const isDevMode = false;
npx cap open electron
That’s it.