tursodatabase / tursodatabase/libsql-client-ts

@libsql/client Module parse failed: Unexpected character ' ' (1:1)

Open
#184 11 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
576
Forks
69
PR merge metrics
No merged PRs in 30d

Description

I’m using this package with NEXT.js and trying to Connect to Turso database. I’m getting this error
` ⨯ ./node_modules/@libsql/darwin-x64/README.md
Module parse failed: Unexpected character ' ' (1:1)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

@libsql/darwin-x64

|
| Prebuilt binary package for libsql on darwin-x64.

Import trace for requested module:
./node_modules/@libsql/darwin-x64/README.md
./node_modules/@libsql/ ./node_modules/@libsql/ sync ^./.*$
./node_modules/libsql/index.js
./node_modules/@libsql/client/lib-esm/sqlite3.js
./node_modules/@libsql/client/lib-esm/node.js
./src/app/lib/prisma.ts
./src/app/page.tsx `

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the import trace from src/app/lib/prisma.ts through src/app/page.tsx, then inspect node_modules/@libsql/client/lib-esm/sqlite3.js and node_modules/libsql/index.js. Reproduce the Next.js build and trace why @libsql/darwin-x64/README.md is being parsed; done means the build no longer attempts to parse that README as a module.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript, webpack
Domain
build-system, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.