tursodatabase / tursodatabase/libsql-client-ts
Cloudflare worker error with opennextjs-cloudflare
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 576
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I'm hoping somebody could shed light on this error I'm getting when trying to deploy a Next.js app on Cloudflare
✘ [ERROR] ⨯ Error: Neon: unsupported Linux architecture:
at currentTarget
(.open-next/server-functions/default/handler.mjs:98994:15)
at requireNative
(.open-next/server-functions/default/handler.mjs:99303:20)
at .open-next/server-functions/default/node_modules/libsql/index.js
(.open-next/server-functions/default/handler.mjs:99338:9)
at require_libsql
(.open-next/server-functions/default/handler.mjs:55:49)
at .open-next/server-functions/default/node_modules/@libsql/client/lib-esm/sqlite3.js
(.open-next/server-functions/default/handler.mjs:99842:29)
at init_sqlite3
(.open-next/server-functions/default/handler.mjs:52:54)
at .open-next/server-functions/default/node_modules/@libsql/client/lib-esm/node.js
(.open-next/server-functions/default/handler.mjs:108213:5)
at init_node3
(.open-next/server-functions/default/handler.mjs:52:54)
at null.<anonymous>
(.open-next/server-functions/default/handler.mjs:108233:52)
[wrangler:inf] GET /api/client/xxx 500 Internal Server Error (55ms)
I also get Error: Neon: unsupported macOS architecture
Here's the repo https://github.com/Escuela-dev/tracking
npm run preview
$ npm run build:worker && wrangler dev
$ opennextjs-cloudflare
┌─────────────────────────────┐
│ OpenNext — Cloudflare build │
└─────────────────────────────┘
App directory: /Users/gianpaj/github/escuela-dev/toggl-tracking-escuela
Next.js version : 14.2.24
@opennextjs/cloudflare version: 0.5.12
@opennextjs/aws version: https://pkg.pr.new/@opennextjs/aws@7e23eee
┌─────────────────────────────────┐
│ OpenNext — Building Next.js app │
└─────────────────────────────────┘
I followed these repos as examples:
- https://github.com/opennextjs/opennextjs-cloudflare/tree/main/examples/create-next-app
- https://github.com/cloudflare/templates/tree/main/next-starter-template
Thanks a lot!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the deployment with npm run preview, which runs npm run build:worker and wrangler dev. Inspect the generated .open-next/server-functions/default/handler.mjs stack and the @libsql/client/lib-esm/sqlite3.js entry point. Done means identifying the cause of the unsupported Linux and macOS architecture errors and confirming that the worker request no longer returns 500.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, sqlite, typescript
- Domain
- backend, cloud, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100