Next.js build with Bun and Turborepo exits with code 1 on Vercel

I’m using bun with turborepo.

I’m trying to deploy to Vercel for my frontend application, but it keeps exiting on build after compiling successfully.

Logs

13:34:07.434 Running build in Washington, D.C., USA (East) – iad1
13:34:07.434 Build machine configuration: 4 cores, 8 GB
13:34:07.609 Cloning github.com/etahub-au/etahub (Branch: turborepo, Commit: d63d8d2)
13:34:07.610 Previous build caches not available.
13:34:07.941 Cloning completed: 331.000ms
13:34:08.260 Running "vercel build"
13:34:08.918 Vercel CLI 50.38.1
13:34:08.996 > Detected Turbo. Adjusting default settings...
13:34:09.131 Running "install" command: `bun install`...
13:34:09.170 bun install v1.3.6 (d530ed99)
13:34:15.650 
13:34:15.650 + @tailwindcss/postcss@4.2.2
13:34:15.650 + @types/bun@1.3.11
13:34:15.650 + @types/react@19.2.14
13:34:15.650 + @types/react-dom@19.2.3
13:34:15.650 + tailwindcss@4.2.2
13:34:15.650 + typescript@6.0.2
13:34:15.651 + class-variance-authority@0.7.1
13:34:15.651 + clsx@2.1.1
13:34:15.651 + lucide-react@0.577.0
13:34:15.651 + next@16.2.1
13:34:15.651 + radix-ui@1.4.3
13:34:15.651 + react@19.2.3
13:34:15.651 + react-dom@19.2.3
13:34:15.651 + react-dropzone@15.0.0
13:34:15.651 + shadcn@4.1.2
13:34:15.651 + tailwind-merge@3.5.0
13:34:15.651 + tw-animate-css@1.4.0
13:34:15.651 + zustand@5.0.12
13:34:15.651 
13:34:15.651 1106 packages installed [6.45s]
13:34:15.686 Detected Next.js version: 16.2.1
13:34:15.687 Running "cd ../.. && turbo run build --filter=@etahub/frontend"
13:34:15.911 
13:34:15.911 Attention:
13:34:15.911 Turborepo now collects completely anonymous telemetry regarding usage.
13:34:15.911 This information is used to shape the Turborepo roadmap and prioritize features.
13:34:15.912 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
13:34:15.912 https://turborepo.dev/docs/telemetry
13:34:15.912 
13:34:16.141 
13:34:16.142    • Packages in scope: @etahub/frontend
13:34:16.142    • Running build in 1 packages
13:34:16.142    • Remote caching enabled
13:34:16.143 
13:34:16.254 @etahub/frontend:build: cache miss, executing 98e0f92720ded684
13:34:16.256 @etahub/frontend:build: $ bun --bun next build
13:34:20.063 @etahub/frontend:build: Attention: Next.js now collects completely anonymous telemetry regarding usage.
13:34:20.063 @etahub/frontend:build: This information is used to shape Next.js' roadmap and prioritize features.
13:34:20.063 @etahub/frontend:build: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
13:34:20.064 @etahub/frontend:build: https://nextjs.org/telemetry
13:34:20.083 @etahub/frontend:build: ▲ Next.js 16.2.1 (Turbopack)
13:34:20.083 @etahub/frontend:build: 
13:34:20.128 @etahub/frontend:build:   Creating an optimized production build ...
13:34:23.600 @etahub/frontend:build: ✓ Compiled successfully in 3.1s
13:34:23.682 @etahub/frontend:build:   Skipping validation of types
13:34:24.863 @etahub/frontend:build: error: "next" exited with code 1
13:34:24.864 @etahub/frontend:build: error: script "build" exited with code 1
13:34:24.865  ERROR  @etahub/frontend#build: command (/vercel/path0/apps/frontend) /bun1/bun run build exited (1)
13:34:24.865 
13:34:24.866   Tasks:    0 successful, 1 total
13:34:24.866  Cached:    0 cached, 1 total
13:34:24.866    Time:    8.859s 
13:34:24.866 Summary:    /vercel/path0/.turbo/runs/3Bn4nE9Gaxz6DlXsaC7yA5COJxB.json
13:34:24.866  Failed:    @etahub/frontend#build
13:34:24.866 
13:34:24.868  ERROR  run failed: command  exited (1)
13:34:24.881 Error: Command "cd ../.. && turbo run build --filter=@etahub/frontend" exited with 1

Configuration

Root package.json

{
  "name": "etahub",
  "private": true,
  "workspaces": [
    "apps/*",
    "packages/*"
  ],
  "scripts": {
    "dev": "turbo run dev",
    "build": "turbo run build",
    "lint": "oxlint .",
    "lint:fix": "oxlint --fix .",
    "format": "oxfmt --check",
    "format:fix": "oxfmt .",
    "typecheck": "turbo typecheck",
    "test": "turbo test"
  },
  "devDependencies": {
    "oxfmt": "catalog:",
    "oxlint": "catalog:",
    "turbo": "^2.0.0",
    "typescript": "catalog:"
  },
  "packageManager": "bun@1.3.11",
  "catalog": {
    "typescript": "^6.0.0",
    "@types/bun": "^1.0.0",
    "@types/react": "^19.0.0",
    "@types/react-dom": "^19.0.0",
    "oxlint": "latest",
    "oxfmt": "latest"
  },
  "dependencies": {
    "@vercel/config": "^0.1.0"
  }
}

Apps package.json

{
  "name": "@etahub/frontend",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "bun --bun next dev --turbo",
    "build": "bun --bun next build",
    "start": "next start",
    "typecheck": "tsc --noEmit"
  },
  "dependencies": {
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "lucide-react": "^0.577.0",
    "next": "16.2.1",
    "radix-ui": "^1.4.3",
    "react": "19.2.3",
    "react-dom": "19.2.3",
    "react-dropzone": "^15.0.0",
    "shadcn": "^4.0.8",
    "tailwind-merge": "^3.5.0",
    "tw-animate-css": "^1.4.0",
    "zustand": "^5.0.12"
  },
  "devDependencies": {
    "@tailwindcss/postcss": "^4",
    "@types/bun": "catalog:",
    "@types/react": "catalog:",
    "@types/react-dom": "catalog:",
    "tailwindcss": "^4",
    "typescript": "catalog:"
  }
}

apps/frontend/next.config.ts

import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  /* config options here */
  typescript: { ignoreBuildErrors: true },
};

export default nextConfig;

Deployment Settings

I tried not to use turbo and just use bun build, but it still errors.

solved by installing @types/node :)))

even though im using bun and skipping typechecking, this one dev depedencies is still needed

Thanks for sharing what worked for you!