-
Notifications
You must be signed in to change notification settings - Fork 12
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 #2
Comments
Can you please show me sample code, or create a repo to test? I don't see any error on the production build. |
I'll get a sample repo up as soon as I can. Unfortunately I can't share this particular project. |
I made a repo showing that has error: https://github.com/MarkRabey/typeorm-errors This was made by cloning this repo, and adding my Entities. I also removed the code inside |
Hi, I was taking a look at this starter project and had the same
as @MarkRabey in dev mode, both with an Android 9 (API level 28) emulator image and an Android 7 device, using the Ionic 5.4.4 and Cordova 9.0.0 as global CLI tools. After some digging, it seems that such issues happen with TypeORM when trying to invoke getRepository('post') when the underlying database adapter isn't ready. I found that by debugging with halt on All + Uncaught Exceptions, a "Cannot read property 'openDatabase' of undefined" happened before this error, which is often related to the platform.ready() event. I tried a few things and found a simple working solution. The submitted solution both worked in dev and prod mode on my emulator and real device. |
Hi @coturiv Any update about the above issue? |
First of all, thanks for the this fork. It got me running Ionic 4 with Typeorm.
However, when I build for production (
ionic cordova run android --prod
) I am unable to run my app. I have devices connected to DevTools and in the console I see the messages in the attached images. (App name is blurred out).StorageLocation
is one of my entities, so I imagineStorageLocation_1
is trying to reference that table or something. Any help is greatly appreciated.The text was updated successfully, but these errors were encountered: