electron-typescript-example icon indicating copy to clipboard operation
electron-typescript-example copied to clipboard

Production build

Open rohmanhm opened this issue 6 years ago • 4 comments

Hi, I need to know how to build this example into production app like .exe?

I have run

electron-builder build --win --x64

But 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 https://github.com/typeorm/electron-typescript-example/blob/06e94488630897ef21f5d8066406ebcf459c76fb/src/index.html#L15-L16 I'm not sure.

rohmanhm avatar Jul 06 '18 10:07 rohmanhm

@pleerock any thoughts?

rohmanhm avatar Jul 06 '18 15:07 rohmanhm

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.

slimlime avatar Jul 12 '18 22:07 slimlime

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

rohmanhm avatar Jul 13 '18 06:07 rohmanhm

You can also try that one: https://github.com/CubikNeRubik/angular-electron-typeorm-starter

CubikNeRubik avatar Aug 07 '18 00:08 CubikNeRubik