Unable to create a Next.js app with Bun, tsconfig.json error
04:06 22 May 2025

During my creation of a Next.js app with Bun, I get the following error. There is an issue while trying to create the tsconfig.json file.

After going to the project directory, since the installation has aborted, there are only a few files, next-config.ts, next-env.d.ts, app/favicon.ico, and app/globals.css. Is this an issue with Bun? I have already uninstalled and reinstalled Bun, but the issue remains. What can I do to fix this?

bun create next-app
√ What is your project named? ... my-app
√ Would you like to use TypeScript? ... No / Yes
√ Would you like to use ESLint? ... No / Yes
√ Would you like to use Tailwind CSS? ... No / Yes
√ Would you like your code inside a `src/` directory? ... No / Yes
√ Would you like to use App Router? (recommended) ... No / Yes
√ Would you like to use Turbopack for `next dev`? ... No / Yes
√ Would you like to customize the import alias (`@/*` by default)? ... No / Yes
Creating a new Next.js app in C:\Users\[Username]\[Path]\my-app.

Using bun.

Initializing project with template: app-tw


Aborting installation.
Unexpected error. Please report it as a bug:
 Error: ENOENT: no such file or directory, open 'C:\Users\[Username]\[Path]\my-app\tsconfig.json'
    at async open (node:internal/fs/promises:638:25)
    at async Object.readFile (node:internal/fs/promises:1238:14)
    at async installTemplate (C:\Users\[Username]\AppData\Local\Temp\bunx-1298176014-create-next-app@latest\node_modules\create-next-app\dist\index.js:74:208634)
    at async createApp (C:\Users\[Username]\AppData\Local\Temp\bunx-1298176014-create-next-app@latest\node_modules\create-next-app\dist\index.js:74:213702)
    at async run (C:\Users\[Username]\AppData\Local\Temp\bunx-1298176014-create-next-app@latest\node_modules\create-next-app\dist\index.js:74:222648) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\Users\\[Username]\\[Path]\\my-app\\tsconfig.json'
}
typescript next.js bun