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

libsql-wasm with expo router #276

Open
younes200 opened this issue Oct 20, 2024 · 0 comments
Open

libsql-wasm with expo router #276

younes200 opened this issue Oct 20, 2024 · 0 comments

Comments

@younes200
Copy link

Hello,

I am currently using libsql on my Expo/React Native project. It works fine with native code, however, I aim to use libsql Wasm for the web version. I am encountering the error: Uncaught SyntaxError: Cannot use 'import.meta' outside a module.

The error points to:

  var sqlite3InitModule = (() => {
    var _scriptDir = import.meta.url;

Here is an example for reference:

import { createClient } from "@libsql/client-wasm";
const client = createClient({
  url: "file:local.db",
});

I suspect the issue could be related to metro bundling, any idea ?

Thank you

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

1 participant