tursodatabase / turso-docs

Turso Documentation
https://docs.turso.tech
MIT License
11 stars 49 forks source link

Problem with @libsql/client in React Native #169

Closed Miguel-Salazar-Dev closed 6 months ago

Miguel-Salazar-Dev commented 7 months ago

Path: /sdk/ts/quickstart

Hello, I am following the instruction in "Turso Quickstart (TypeScript / JS)":

First, install the @libsql/client, and restart the Metro server.

npm install @libsql/client

Second, create the client:

`import { createClient } from "@libsql/client";

const client = createClient({ url: "libsql://...", authToken: "...", }); ` Introducing my libsql address, and my token generate in the Turso Dashboard.

Here if I launch the app in the Android Emulator, i get the following error:

"Syntax Error"

@libsql/core/api could not be found within the project or in these directories: node_modules

could you please, explaine if these if a package problem? because i have tried these both in Reac Native and Expo React Native, and have the same problem in both.

notrab commented 6 months ago

Hey @Miguel-Salazar-Dev

Our story with React Native isn't great because of the node file system dependencies. I'd recommend you join our community on Discord as there are some previous discussions about this that may help.