Production build
rohmanhm opened this issue · 5 comments
Hi, I need to know how to build this example into production app like .exe?
I have run
electron-builder build --win --x64But throws an error
• electron-builder version=20.19.1
• description is missed in the package.json appPackageFile=C:\Users\Romsy\Documents\Code\Test\electron-typescript-example\package.json
• writing effective config file=dist\electron-builder-effective-config.yaml
• rebuilding native production dependencies platform=win32 arch=x64
• rebuilding native dependency name=sqlite3
• packaging platform=win32 arch=x64 electron=1.8.7 appOutDir=dist\win-unpacked
Error: Application entry file "index.js" in the "C:\Users\Romsy\Documents\Code\Test\electron-typescript-example\dist\win-unpacked\resources\app.asar" does not exist. Seems like a wrong configuration.I just want to make sure that this example will have no error after release build.
Because I have an app that follows along the way with how this app works but only works on development mode, when I run on release build its error says that Cannot find module typeorm. Maybe because this line
electron-typescript-example/src/index.html
Lines 15 to 16 in 06e9448
Hi @rohmanhm Can you verify that your dist builds correctly without TypeORM and compare/contrast that behaviour with this build that includes TypeORM?
I am also interested in integrating Electron TypeORM in the coming few weeks and will come up with a solution.
What technologies are you using?
I wouldn't recommend importing modules through a script tag in html.
Yeah, don't use typeorm on html tag.
I think the best way to integrate typeorm and electron is with ipcMain and ipcRenderer
This boilerplate inspired me.
https://github.com/HyperSprite/electron-react-boilerplate-with-material-ui
This is mine also works now in dev and production mode using ipcMain and ipcRenderer.
https://github.com/rohmanhm/electron-ts-react-boilerplate-with-office-ui-fiber
You can also try that one:
https://github.com/CubikNeRubik/angular-electron-typeorm-starter