Closed Nickolas- closed 2 years ago
@Nickolas- can you share the main.ts and the app.ts files
@jepiqueau thanks , for quick response! Quasar framework do not have a main.ts it uses a boot files.
App.vue
database.ts
@Nickolas- can you share appDataSource
@Nickolas- the openModes must be RW or RO or both read-write RW, read-only RO. Open does not exist
@jepiqueau FYI
I do no think the issue , in wrong open modes, becuase as I said everything works on ios/android
I read something about stencil components to experimental import
I did add that too
@Nickolas- the checkConsistency is mainly used for live reload . Any how the 'open' mode clearly does not exist. I do not know if you have a vue.config.js file look at what i put in to have typeOrm working in https://github.com/jepiqueau/vue-typeorm-app. That could help you. I am away from my computer for the next 3 weeks so i cannot run your app. Tell me if s'éteint the vue.config.js help in solving your issue
@jepiqueau vue.config.js just store some info for webpack and im using vite. I do no think they are related ?
@Nickolas- there is nothing more i can do for the next 3 week-end so you are on your own
Hi @jepiqueau , I found an issue at stencil github about dynamic loads and Vite. https://github.com/ionic-team/stencil/issues/2827 What do you think , could be it related ? I will try today add this flag to stencil config and rebuild a package. Let's see
@Nickolas- i remember for vite app the way to import the Stencil component is different. Look at https://github.com/gepiqueau/vuevite-app this should solve your issue
@Nickolas- Did that help you to solve the issue ?
@jepiqueau I didnt test actually , do not have a time right now to play around. Will do maybe on weekeneds. For right now I did a workaround to make it work
@jepiqueau btw your link does not work for me. I got 404.
@Nickolas- you get a 404 as you certainly did not copy the sql-wasm.wasm file from sql.js installed into the public/assets folder of the app as mentioned in the doc
@jepiqueau I got 404 on your link , not in app :) https://github.com/gepiqueau/vuevite-app this one not works :)
@jepiqueau about sql-wasm.wasm I try in to different ways, one is load from static files , other to load from sqljs.org at runtime
@Nickolas- sorry https://github.com/jepiqueau/vuevite-app
@Nickolas- to have it working with capacitor 4 you have to follow the instructions from ionic capacitor 3 to 4
@Nickolas- have you had time to try?
Not yet , maybe on weekends.
@Nickolas- OK good luck
@jepiqueau so after of ton wasted time , i would not recommend anyone to work with typeorm and vite. Its just not ready , to many things fail in runtime.
With webpack everything work like a charm. No extra coded need.
Have a good day :)
@Nickolas- thanks for your painfull work sorry that you cannot succeed but at least it is a good feedback for other developers
@Nickolas- i close the issue
@jepiqueau so after of ton wasted time , i would not recommend anyone to work with typeorm and vite. Its just not ready , to many things fail in runtime.
I also tried to develop project vite + vue3 + capacitor + @capacitor-community/sqlite and ran into a project build problem when connecting typeorm. I will leave a link to the issue for those who will look for information in the future (unfortunately this method did not help me, but maybe this method will work for you or a solution will be found that works for everyone).
I also had problems when generating typeorm migrations with dataSource type 'capacitor', but maybe I missed something in this case.
Hi @jepiqueau, coming back with a good news. To run sqlite typeorm and Vite was a challenge but I did it successfully. First of all do not use
Vite do not know how to resolve all required dynamic dependencies. Use:
This will solve the issue in production mode related to
Second is to solve all typeorm issues with Vite in production. Here a github issue from typeorm repository. Maybe later I can create a demo with Vite sqlite typeorm quasar. Have a good day
Same issue here (vite+quasar+vue3+capacitor+sqlite).
I can confirm the workaround calling customElements.define('jeep-sqlite',JeepSqlite);
before jeepSqlite(window)
(not after)
@mmouterde look at https://jepiqueau.github.io/2023/09/05/Ionic7Vue-SQLite-CRUD-App.html you will see how it is done for vite vue app
Describe the bug Cant make it run on quasar SPA with vite
Expected behavior Web version works as ios/android
Quasar latest