next/font works when built locally, but not when deployed to Vercel #48904
Replies: 4 comments 3 replies
-
@BaileySimrell I am having the same issue. Were you able to resolve this? |
Beta Was this translation helpful? Give feedback.
-
@BaileySimrell I personally just fixed it by removing font optimization from my |
Beta Was this translation helpful? Give feedback.
-
For anyone who faces this issue while using |
Beta Was this translation helpful? Give feedback.
-
same problem, locally works just fine, Vercel raise an error |
Beta Was this translation helpful? Give feedback.
-
Summary
Hello everyone! I could use some help on this one as I'm genuinely stuck.
I'm seeing an odd issue where next/font works perfectly fine in localhost when using both
npm run dev
andnpm run build / start
Maybe I am missing something obvious here, but I already tried following a few other discussions and configurations like disabling font optimization in the next.config file as well as running
npx update-browserslist-db@latest
which has fixed what seemed like the same error for me just last week, however nothing seems to work in this case for me.. It's also been super difficult trying to debug this as everything in the css inspector / chrome console is identical in the remote vs localhost versions, which has me very confused.Below is what I have in our tailwind.config.js file
And below this is a screenshot of our next.config.js file
Here's a Loom video demo of the issue: https://www.loom.com/share/4ea0967fcdce447099b60b7b4054d6d2
And here are screenshots comparing the localhost vs preview branch version:
Additional information
Example
https://web-simrell-slicespace.vercel.app/
Beta Was this translation helpful? Give feedback.
All reactions