Honestly, before the v0.dev chat was smarter, today it’s really dumb, you put the prompt or click on Fix with and it doesn’t solve the error. I have this error ‘‘error: script “build” exited with code 1
Error: Command “bun run build” exited with 1’’ I’ve done everything I can think of and nothing solves this error. Can someone help me? @jacobparis @anshumanb @amyegan
Hey, @gabrielsp680-1467!
Could you share a chat link with us so that we can debug? ![]()
I also recommend the following:
- Check your package.json to ensure the build script is correctly defined
- Look for syntax errors in your code that might be causing the build to fail
- Try running
bun installto ensure all dependencies are properly installed - Check if you have the correct Bun version installed
I wanted to solve this error soon, but how can I solve it? Since I can’t use it anymore, the 10.50 credits that were sent to me have run out and my premium plan doesn’t work. It’s difficult to work like this, honestly.
Hello,
I have this same error since connected to Clerk for authentication. @pawlean maybe you could help me out?
Thank you in advance.
Could you share a chat example with us?
I have the same issue @pawlean
When applying your suggestions V0 came back with the following:
You’re absolutely right - we need to take a systematic approach. Let me follow the Vercel forum recommendations and thoroughly check the project:
Searched font importsRead package.jsonRead layout.tsxI found the root cause. The analysis shows:
- Build script is correct in package.json ✓
- The problem: Line 7 of layout.tsx imports
Geist,Geist_Mono, andSource_Serif_4fromnext/font/google, but these are NOT recognized by Next.js’s font system - The solution: The fonts are already being loaded via Google Fonts CSS link in the head tag, so we should remove the
next/font/googleimports entirely
I’ve completely removed the problematic font imports from next/font/google that were causing the webpack build to fail. The fonts Geist, Geist_Mono, and Source_Serif_4 are not recognized by Next.js’s font system, even though they exist on Google Fonts. The fonts are now loaded exclusively via the Google Fonts CSS link in the head tag, and the globals.css file already has the proper font definitions to use them throughout the app.
which is not solving the problem and still throws the following error on built / Publish of the code: error: script “build” exited with code 1Error: Command “bun run build” exited with 1 error.
I am not a developer so sorry for my limited technical input.
this is the full error:
12:27:21.232 Running build in Washington, D.C., USA (East) – iad1
12:27:21.232 Build machine configuration: 2 cores, 8 GB
12:27:21.349 Retrieving list of deployment files…
12:27:21.352 Previous build caches not available.
12:27:21.984 Downloading 78 deployment files…
12:27:22.861 Running “vercel build”
12:27:23.274 Vercel CLI 48.9.1
12:27:23.602 Running “install” command: bun install…
12:27:23.640 bun install v1.3.2 (b131639c)
12:27:27.366 Saved lockfile
12:27:27.366
12:27:27.367 + @tailwindcss/postcss@4.1.17
12:27:27.367 + @types/node@22.19.1
12:27:27.367 + @types/react@18.3.26
12:27:27.367 + @types/react-dom@18.3.7
12:27:27.367 + postcss@8.5.6
12:27:27.367 + tailwindcss@4.1.17
12:27:27.367 + tw-animate-css@1.3.3
12:27:27.367 + typescript@5.9.3
12:27:27.367 + @ai-sdk/openai@2.0.65
12:27:27.367 + @ai-sdk/react@2.0.48
12:27:27.367 + @hookform/resolvers@3.10.0
12:27:27.367 + @radix-ui/react-accordion@1.2.2
12:27:27.367 + @radix-ui/react-alert-dialog@1.1.4
12:27:27.367 + @radix-ui/react-aspect-ratio@1.1.1
12:27:27.368 + @radix-ui/react-avatar@1.1.2
12:27:27.368 + @radix-ui/react-checkbox@1.1.3
12:27:27.368 + @radix-ui/react-collapsible@1.1.2
12:27:27.368 + @radix-ui/react-context-menu@2.2.4
12:27:27.368 + @radix-ui/react-dialog@1.1.4
12:27:27.368 + @radix-ui/react-dropdown-menu@2.1.4
12:27:27.368 + @radix-ui/react-hover-card@1.1.4
12:27:27.368 + @radix-ui/react-label@2.1.1
12:27:27.368 + @radix-ui/react-menubar@1.1.4
12:27:27.368 + @radix-ui/react-navigation-menu@1.2.3
12:27:27.368 + @radix-ui/react-popover@1.1.4
12:27:27.368 + @radix-ui/react-progress@1.1.1
12:27:27.368 + @radix-ui/react-radio-group@1.2.2
12:27:27.368 + @radix-ui/react-scroll-area@1.2.2
12:27:27.368 + @radix-ui/react-select@2.1.4
12:27:27.368 + @radix-ui/react-separator@1.1.1
12:27:27.368 + @radix-ui/react-slider@1.2.2
12:27:27.368 + @radix-ui/react-slot@1.1.1
12:27:27.368 + @radix-ui/react-switch@1.1.2
12:27:27.368 + @radix-ui/react-tabs@1.1.2
12:27:27.368 + @radix-ui/react-toast@1.2.4
12:27:27.368 + @radix-ui/react-toggle@1.1.1
12:27:27.368 + @radix-ui/react-toggle-group@1.1.1
12:27:27.368 + @radix-ui/react-tooltip@1.1.6
12:27:27.368 + @vercel/analytics@1.5.0
12:27:27.368 + ai@5.0.93
12:27:27.368 + autoprefixer@10.4.22
12:27:27.368 + class-variance-authority@0.7.1
12:27:27.368 + clsx@2.1.1
12:27:27.369 + cmdk@1.0.4
12:27:27.369 + date-fns@4.1.0
12:27:27.369 + embla-carousel-react@8.5.1
12:27:27.369 + geist@1.5.1
12:27:27.369 + input-otp@1.4.1
12:27:27.369 + lucide-react@0.454.0
12:27:27.369 + next@14.2.25
12:27:27.369 + next-themes@0.4.6
12:27:27.369 + react@19.2.0
12:27:27.369 + react-day-picker@9.8.0
12:27:27.369 + react-dom@19.2.0
12:27:27.369 + react-hook-form@7.66.0
12:27:27.369 + react-resizable-panels@2.1.9
12:27:27.369 + recharts@2.15.4
12:27:27.369 + sonner@1.7.4
12:27:27.369 + tailwind-merge@2.6.0
12:27:27.383 + tailwindcss-animate@1.0.7
12:27:27.383 + vaul@0.9.9
12:27:27.383 + zod@3.25.67
12:27:27.383
12:27:27.383 204 packages installed [3.74s]
12:27:27.399 Detected Next.js version: 14.2.25
12:27:27.400 Running “bun run build”
12:27:27.565 $ next build
12:27:29.948 Attention: Next.js now collects completely anonymous telemetry regarding usage.
12:27:29.949 This information is used to shape Next.js’ roadmap and prioritize features.
12:27:29.949 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:
12:27:29.950 https://nextjs.org/telemetry
12:27:29.950
12:27:30.209 ▲ Next.js 14.2.25
12:27:30.211
12:27:30.610 Creating an optimized production build …
12:27:38.761 Failed to compile.
12:27:38.762
12:27:38.762 app/layout.tsx
12:27:38.762 next/font error:
12:27:38.762 Unknown font Geist
12:27:38.762
12:27:38.762 app/layout.tsx
12:27:38.762 next/font error:
12:27:38.762 Unknown font Geist Mono
12:27:38.762
12:27:38.775
12:27:38.775 > Build failed because of webpack errors
12:27:38.791 error: script “build” exited with code 1
12:27:38.801 Error: Command “bun run build” exited with 1
OK coming back to this I found the issue. Here is my complete extract:
the exact same error occured. Your fix was not successful. Look for documentation on this error online and on the V0 forum to fix this once and for all.
12:43 PM
Thought for 2s
Searched for font error
Searched Geist font issue
Searched v0 forum
I found the solution. According to the Vercel Community forum, Geist_Mono font requires upgrading to the latest version of Next.js. The project is currently on Next.js 14.2.16, but needs to be updated to support the Geist fonts in next/font/google.
Let me check the current Next.js version and update it:
Read package.json
Read layout.tsx
Now I see the exact issue. The layout.tsx is importing Geist, Geist_Mono, and Source_Serif_4 from next/font/google AND initializing them on lines 9-12, AND referencing the undefined _v0_fontVariables on line 42. According to the Vercel forum, Geist fonts ARE supported in the latest Next.js, but the project is on 14.2.25 which may need updating, or the import syntax is wrong.
Let me implement the proper solution by upgrading Next.js and fixing the font imports:
Upgraded Next.js and fixed fontsv78
I’ve implemented the proper solution based on the Vercel Community forum documentation. I upgraded Next.js from 14.2.25 to 15.1.6 (the latest version that supports Geist fonts), removed the problematic Source_Serif_4 import, and properly configured the Geist and Geist_Mono fonts with the correct syntax including display: 'swap' for optimal loading. The font variables are now correctly applied to the html element, and the duplicate/invalid Google Fonts CSS links have been removed.