running next dev or build in production mode results in
> next dev
▲ Next.js 14.2.3
- Local: http://localhost:3000
- Environments: .env.local
- Experiments (use with caution):
· typedRoutes
✓ Starting...
✓ Ready in 2.5s
○ Compiling /_not-found ...
⨯ ../../node_modules/.pnpm/@libsql+client@0.6.0/node_modules/@libsql/client/README.md
Module parse failed: Unexpected token (1:0)
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
> <p align="center">
| <a href="https://docs.turso.tech/sdk/ts/quickstart">
| <img alt="Turso + TypeScript" src="https://github.com/tursodatabase/libsql-client-ts/assets/950181/5d3a2693-75f9-4c56-9107-8ccaa96785fd" width="1000">
Import trace for requested module:
../../node_modules/.pnpm/@libsql+client@0.6.0/node_modules/@libsql/client/README.md
../../node_modules/.pnpm/libsql@0.3.18/node_modules/@libsql/ ../../node_modules/.pnpm/node_modules/@libsql/ ../../node_modules/.pnpm/node_modules/@libsql/ ../../node_modules/.pnpm/libsql@0.3.18/node_modules/@libsql/ ../../node_modules/.pnpm/node_modules/@libsql/ ../../node_modules/.pnpm/node_modules/@libsql/ sync ^\.\/.*$
../../node_modules/.pnpm/libsql@0.3.18/node_modules/libsql/index.js
../../node_modules/.pnpm/@libsql+client@0.6.0/node_modules/@libsql/client/lib-esm/sqlite3.js
../../node_modules/.pnpm/@libsql+client@0.6.0/node_modules/@libsql/client/lib-esm/node.js
../../packages/db/src/index.ts
EDIT
the following loader in next.config.js parses README and LICENSE but fails at node:
⨯ ../../node_modules/.pnpm/@libsql+linux-x64-gnu@0.3.18/node_modules/@libsql/linux-x64-gnu/index.node
Module parse failed: Unexpected character '' (1:0)
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
(Source code omitted for this binary file)
Import trace for requested module:
../../node_modules/.pnpm/@libsql+linux-x64-gnu@0.3.18/node_modules/@libsql/linux-x64-gnu/index.node
../../node_modules/.pnpm/libsql@0.3.18/node_modules/@libsql/ ../../node_modules/.pnpm/node_modules/@libsql/ ../../node_modules/.pnpm/node_modules/@libsql/ ../../node_modules/.pnpm/libsql@0.3.18/node_modules/@libsql/ ../../node_modules/.pnpm/node_modules/@libsql/ ../../node_modules/.pnpm/node_modules/@libsql/ sync ^\.\/.*$
Workaround is to reinstall @libsql/client in the nextjs app doing the webpack bundle.
It still has to be dependency only in the workspace app housing the client code, in a monorepo scenario
.env.local
packages/db/src/index.ts
package.json deps
apps/web/next.config.js
running next dev or build in production mode results in
EDIT the following loader in next.config.js parses README and LICENSE but fails at node:
err
related: https://github.com/tursodatabase/libsql/issues/1276 https://github.com/vitejs/vite/discussions/15802