Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin 24.5.0
Available memory (MB): 16384
Available CPU cores: 10
Binaries:
Node: 22.7.0
npm: 10.8.2
bun: 1.2.19
Relevant Packages:
next: 15.5.0
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.2
Next.js Config:
output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
Turbopack
Which stage(s) are affected? (leave empty if unsure)
next build (local)
Describe the Bug
Turbopack fails to build when using drizzle-orm/libsql. It incorrectly attempts to parse the LICENSE file from node_modules/@libsql/hrana-client/LICENSE as JavaScript code.
Error output:
Error: Turbopack build failed with 1 errors:
./node_modules/@libsql/hrana-client/LICENSE:1:5
Parsing ecmascript source code failed
> 1 | MIT License
| ^^^^^^^
2 |
3 | Copyright 2023 the sqld authors
4 |
Expected ';', '}' or <eof>
Expected Behavior
Turbopack should not attempt to parse LICENSE files as JavaScript. The build should complete successfully.
Link to the code that reproduces this issue
https://github.com/madebycm/turbopack-license-bug
To Reproduce
- Clone the repository
git clone https://github.com/madebycm/turbopack-license-bug
cd turbopack-license-bug
- Install dependencies
- Run build with Turbopack
npx next build --turbopack
The build will fail with the LICENSE parsing error.
Additional Context
Important: This bug only occurs when importing from drizzle-orm/libsql:
- ✅ Works:
import { createClient } from '@libsql/client'
- ❌ Fails:
import { drizzle } from 'drizzle-orm/libsql'
The issue appears to be related to how Turbopack handles transitive dependencies when certain import patterns are used.
Workaround: Use standard Webpack build without --turbopack flag:
This blocks Turbopack adoption for any application using Drizzle ORM with SQLite/LibSQL.
PACK-5319
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Turbopack
Which stage(s) are affected? (leave empty if unsure)
next build (local)
Describe the Bug
Turbopack fails to build when using
drizzle-orm/libsql. It incorrectly attempts to parse the LICENSE file fromnode_modules/@libsql/hrana-client/LICENSEas JavaScript code.Error output:
Expected Behavior
Turbopack should not attempt to parse LICENSE files as JavaScript. The build should complete successfully.
Link to the code that reproduces this issue
https://github.com/madebycm/turbopack-license-bug
To Reproduce
git clone https://github.com/madebycm/turbopack-license-bug cd turbopack-license-bugThe build will fail with the LICENSE parsing error.
Additional Context
Important: This bug only occurs when importing from
drizzle-orm/libsql:import { createClient } from '@libsql/client'import { drizzle } from 'drizzle-orm/libsql'The issue appears to be related to how Turbopack handles transitive dependencies when certain import patterns are used.
Workaround: Use standard Webpack build without
--turbopackflag:This blocks Turbopack adoption for any application using Drizzle ORM with SQLite/LibSQL.
PACK-5319