I’ve built an offline POS system using Electron, React, TypeScript, and Better SQLite3. The application works perfectly in Linux (both development and production builds). However, in Windows,development is working perfectly while the application installs and opens, it shows a blank screen in the production build.
The database connection is successfully established, as verified by logs, but no content is displayed. Here are the details of my setup and what I’ve tried so far:
Tech Stack:
- Electron
- React
- Better SQLite3
- TypeScript
- Development OS: PopOS (Linux)
- Production Environment: Windows
1. Database Connection:
Logs confirm the database connection is established successfully.
The database is being copied to the userData directory in production and appears to have the correct permissions.
2. Frontend Paths:
In development, the React app loads from http://localhost:3000.
In production, the app is supposed to load index.html from the bundled build folder using:
3. Packaging:
The app is packaged using electron-builder. The build directory contains the required files (index.html, JS, CSS, etc.).
Riajul Islam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.