I'm trying to create a database adapter for WatermelonDB for Tauri (using vite). I've followed the instructions to compile watermelondb and then symbolically link it into my Tauri project.
However, when the app starts I get a blank screen, the following error:
[Error] SyntaxError: Importing binding name 'tableSchema' is not found.
Given that adding an importing watermelondb normally works, I'm guessing this has to do with some transpilation issue.
I've scoured the internet for this type of error (which I've never seen before in my development years) and haven't found much info besides some suggestion it might have to do with the module system being used.
Has anyone faced an issue like this before? Any ideas?
Found the issue, though the answer will vary from case to case. Basically what the error is saying is that it could not execute the import. Why will vary from case to case. It could be because ESM/CJS module system incompatibility for example. In my case, it was because the symbolic links, Vite does not support them and I assumed they would work. Once I placed the sources in the correct spot, everything started working.