Link to the code that reproduces this issue
https://github.com/brrock/buntestapis/
To Reproduce
Start the app with bun run --bun dev --turbo pack and use the form the api route should fail to compile even though I'm using bun and have bun types installed
Current vs. Expected behavior
I expect this to just use the bun runtime and compile and work simply work but throws this error Error:
✓ Compiled /api/s3write in 377ms
⨯ ./app/api/s3write/route.ts:2:1
Module not found: Can't resolve 'bun'
1 | // app/api/s3write/route.ts
> 2 | import { S3Client } from "bun";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 | import { NextResponse } from 'next/server';
4 |
5 | // Initialize S3 client
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: kernel 6.12.9-arch1-1
Available memory (MB): 15763
Available CPU cores: 4
Binaries:
Node: 23.6.0
npm: 10.9.2
Yarn: N/A
pnpm: 9.15.4
Relevant Packages:
next: 15.1.6 // Latest available version is detected (15.1.6).
eslint-config-next: 15.1.6
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
Link to the code that reproduces this issue
https://github.com/brrock/buntestapis/
To Reproduce
Start the app with
bun run --bun dev --turbo packand use the form the api route should fail to compile even though I'm using bun and have bun types installedCurrent vs. Expected behavior
I expect this to just use the bun runtime and compile and work simply work but throws this error Error:
Provide environment information
Which area(s) are affected? (Select all that apply)
Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response