Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turbopack error when using roboto flex font #74432

Open
Arctomachine opened this issue Dec 31, 2024 · 2 comments
Open

Turbopack error when using roboto flex font #74432

Arctomachine opened this issue Dec 31, 2024 · 2 comments
Labels
bug Issue was opened via the bug report template. Font (next/font) Related to Next.js Font Optimization. Turbopack Related to Turbopack with Next.js.

Comments

@Arctomachine
Copy link

Link to the code that reproduces this issue

https://github.com/Arctomachine/next-font-roboto-flex-bug

To Reproduce

Start dev server and open page in browser

Current vs. Expected behavior

Current: gives error 500 when following is present. Error happens when constant is assigned. Other fonts from roboto family work

import { Roboto_Flex } from 'next/font/google'

const robotoFlex = Roboto_Flex({
  subsets: ['latin'],
})

Expected: works with this font

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 32720
  Available CPU cores: 12
Binaries:
  Node: 20.17.0
  npm: 10.8.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.1.1-canary.23 // Latest available version is detected (15.1.1-canary.23).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Font (next/font), Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

@Arctomachine Arctomachine added the bug Issue was opened via the bug report template. label Dec 31, 2024
@github-actions github-actions bot added Font (next/font) Related to Next.js Font Optimization. Turbopack Related to Turbopack with Next.js. labels Dec 31, 2024
@a3har
Copy link

a3har commented Jan 1, 2025

Tried to replicate this here but unable to do so.

Link: https://codesandbox.io/p/github/a3har/next-font-roboto-flex-bug/master?import=true

Could you please replicate this issue in a sandbox so that I can take a better look ?

@Arctomachine
Copy link
Author

That is strange. Error should be triggered the moment constant is assigned value.
Could be something related to environment then? Since I encounter it locally on windows, but on linux sandbox it works.
Did you try it locally too, including windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Font (next/font) Related to Next.js Font Optimization. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants