-
Notifications
You must be signed in to change notification settings - Fork 0
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
Getting typeorm to run #1
Comments
thanks for the feedback! This fixes indeed some compiler issues, but not all of them. I now get this:
I'm not sure whats the issue now. What do you mean that window.SQL is now undefined? Does this happen for you during runtime or during some build step? It looks like its the same problem I had in my original issue after upgrading manually to angular6 typeorm/ionic-example#23 (comment) |
Hi, you can cirumvent this issue in commenting out some lines (yeah, dirty hack) in Then you get another issue with sqljs an that is the part I'm working on at the moment. |
Okay, I got it working. The "fix" from my previous post is not necessary. Due to incompatibilities of Angular 6 an "fs" you have to edit some files:
I know this is REALLY dirty, but you can now test in the Browser. Cheers |
yes, the build works indeed with these changes. And of course, this is no solution that should be used in any serious project. Point 1 and 3 could be fixed in sql.js/typeorm but the change in angular-devkit seems to be one the angular devs explicitely have changed in angular 6 so I see no chance that it will be changed there. I'm sorry, that I'm no real help, but I know next to nothing about webpack. |
Any updates on this, seems to still be happening on Angular 7 and is a rather significant blocker |
Hi, just reverted all changes from my last Post and did these changes: package.json (add config): app/tsconfig.app.json (change line under compiler options): This seems to compile a freshly installed ionic 4 App including typeorm. Cheers |
@wexstorm Hi, im having the same issues. What do you mean by "... (add config):"? |
hey @varogonz95 please have a look at https://github.com/coturiv/ionic4-typeorm-starter it works almost perfect as a starter project for ionic4 and typeorm. I have only 2 problems:
|
@varogonz95: It means, you have to add those lines, if they are not there. @marcorinck: I cannot get it to work with sql.js 1.0 - this is frustrating... |
@wexstorm like this? {
//etc...
"config":
{ "browser": { "http": false, "https": false, "net": false, "path": false, "stream": false, "tls": false } }
} @marcorinck Hi, I saw this issue yesterday while doing some testing. I think you can completely ignore those warnings. But if you want to suppress them: https://stackoverflow.com/questions/50798660/suppress-circular-dependency-detected-suppress-warning-in-angular-6 |
@varogonz95 the thing is you can choose to suppress or ignore those warnings, but in this case they are reported for a reason. The imported dependencies (entities) are null and can‘t be used for anything. You have to fix the underlying problem if you want to use them. Without using strings in the decorator to describe your relations, your only solution is using EntitySchemas. @wexstorm I‘m using sqlite in Cordova, works without a problem so far. |
How to run this patch.sh in ionic4? |
Hi,
thanks for your effort. You can try to get this to run with the following "fix":
"paths": { "typeorm": ["../node_modules/typeorm/browser"] },
Sadly now window.SQL is undefined, because of no webpack compilation.
Does this work for you?
Cheers
The text was updated successfully, but these errors were encountered: