Open draqo666 opened 7 months ago
@draqo666 What version of Next.js is this? The issue is supposed to be fixed in recent versions that have the following bug fix: https://github.com/vercel/next.js/pull/56192
@penberg I'm also facing the same issue in nextjs@14.1.0 and drizzle-orm@^0.29.3. I'm using drizzle queries inside zustand
Error from client(browser):
./node_modules/.pnpm/@libsql+hrana-client@0.5.6/node_modules/@libsql/hrana-client/LICENSE
Module parse failed: Unexpected token (1:4)
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
> MIT License
|
| Copyright 2023 the sqld authors
~~I am getting the same problem. I'll keep getting build errors with nextjs@14.1.3, prisma@5.10.2 and libsql@0.5.3, nodejs@20.10.0~~
Failed to compile.
./node_modules/@libsql/darwin-arm64/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-arm64`
|
| Prebuilt binary package for `libsql` on `darwin-arm64`.
I noticed that I didn't use use server
for one of my server components. When I add that the build has succeeded.
I did not try this but I think this could work.
Manually add the package to serverComponentsExternalPackages
(see https://github.com/vercel/next.js/blob/canary/docs/02-app/02-api-reference/05-next-config-js/serverComponentsExternalPackages.mdx)
@Jolg42 While I was trying to share my error message (thank you for being my yellow rubber duck today 😄) I noticed that one of my components is showing up in every time. When I checked it I saw that I forgot to add 🤦 use server
on top of it. I added it and now the build is passing.
I faced this issue today, and fixed it with import it with web like that
import {} from "@libsql/client/web"
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
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 `