Skip to content

[Bug]: Unable to build - issue with Turbopack and Google Fonts #639

@x86fantini

Description

@x86fantini

Hi, just cloned the repo and run the docker build command, using the compose file. Here is the issue:

 > [frontend-builder 6/6] RUN npm run build:                                                                                                                                                                     
0.213                                                                                                                                                                                                            
0.213 > resume-matcher-ui@1.0.0 build                                                                                                                                                                            
0.213 > next build                                                                                                                                                                                               
0.213                                                                                                                                                                                                            
0.585 Attention: Next.js now collects completely anonymous telemetry regarding usage.                                                                                                                            
0.585 This information is used to shape Next.js' roadmap and prioritize features.                                                                                                                                
0.585 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:                                                                    
0.585 https://nextjs.org/telemetry                                                                                                                                                                               
0.585                                                                                                                                                                                                            
0.591 ▲ Next.js 16.1.1 (Turbopack)                                                                                                                                                                               
0.591 - Experiments (use with caution):
0.591   ✓ turbopackUseSystemTlsCerts
0.591 
0.617   Creating an optimized production build ...
2.742 Turbopack build encountered 2 warnings:
2.742 [next]/internal/font/google/geist_efde1a47.module.css
2.742 Error while requesting resource
2.742 There was an issue establishing a connection while requesting https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap
2.742 
2.742 Import trace:
2.742   Server Component:
2.742     [next]/internal/font/google/geist_efde1a47.module.css
2.742     [next]/internal/font/google/geist_efde1a47.js
2.742     ./app/layout.tsx
2.742 
2.742 
2.742 [next]/internal/font/google/space_grotesk_4f9f433b.module.css
2.742 Error while requesting resource
2.742 There was an issue establishing a connection while requesting https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap
2.742 
2.742 Import trace:
2.742   Server Component:
2.742     [next]/internal/font/google/space_grotesk_4f9f433b.module.css
2.742     [next]/internal/font/google/space_grotesk_4f9f433b.js
2.742     ./app/layout.tsx
2.742 
2.742 
2.980 
2.980 > Build error occurred
2.983 Error: Turbopack build failed with 2 errors:
2.983 [next]/internal/font/google/geist_efde1a47.module.css
2.983 next/font: error:
2.983 Failed to fetch `Geist` from Google Fonts.
2.983 
2.983 Import trace:
2.983   Server Component:
2.983     [next]/internal/font/google/geist_efde1a47.module.css
2.983     [next]/internal/font/google/geist_efde1a47.js
2.983     ./app/layout.tsx
2.983 
2.983 
2.983 [next]/internal/font/google/space_grotesk_4f9f433b.module.css
2.983 next/font: error:
2.983 Failed to fetch `Space Grotesk` from Google Fonts.
2.983 
2.983 Import trace:
2.983   Server Component:
2.983     [next]/internal/font/google/space_grotesk_4f9f433b.module.css
2.983     [next]/internal/font/google/space_grotesk_4f9f433b.js
2.983     ./app/layout.tsx
2.983 
2.983 
2.983     at ignore-listed frames
------
Dockerfile:26

anyone facing this issue? thank you

To Reproduce

to reproduce:

  1. clone repo
  2. run docker compose build

my env:
MacOS Tahose
Docker 28.5

Expected behavior

Succesful build

Environment

  • OS: [e.g. macOS / Windows / iOS]
  • Browser / Version: [e.g. Chrome 100]
  • Device: [e.g. iPhone 14]

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions