Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production build #1

Open
rohmanhm opened this issue Jul 6, 2018 · 4 comments
Open

Production build #1

rohmanhm opened this issue Jul 6, 2018 · 4 comments

Comments

@rohmanhm
Copy link

rohmanhm commented Jul 6, 2018

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

<script>
var typeorm = require("typeorm");
I'm not sure.

@rohmanhm
Copy link
Author

rohmanhm commented Jul 6, 2018

@pleerock any thoughts?

@slimlime
Copy link

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.

@rohmanhm
Copy link
Author

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

@CubikNeRubik
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants