This repository demonstrates a bug where Turbopack fails to build Next.js projects that include @libsql/hrana-client (via @libsql/client).
Turbopack incorrectly attempts to parse the LICENSE file from @libsql/hrana-client as JavaScript, resulting in a parsing error.
- Clone this repository
- Install dependencies:
npm install - Try to build with Turbopack:
npx next build --turbopack
The build should complete successfully.
Build fails with error:
Error: Turbopack build failed with 1 errors:
./node_modules/@libsql/hrana-client/LICENSE:1:5
Parsing ecmascript source code failed
> 1 | MIT License
| ^^^^^^^
Expected `;`, `}` or <eof>
Use standard Webpack build without the --turbopack flag:
npx next build