turbo
turbo copied to clipboard
[Turbopack] Breaks @next/font/local
What version of Turborepo are you using?
default for next 13
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Describe the Bug
@next/font/local is broken with turbo. I get only an error from the @next/font library. "Error: @next/font/local failed to run or is incorrectly configured." I'm reporting it here because when I take off --turbo from the dev script everything works fine.
Expected Behavior
No error.
To Reproduce
- new install of next 13
- install dep @next/font
- add layout file
- import
localFontfrom '@next/font/local' - copy any font to same file location
./app/cool-font.woff - Import the font as per instructions here
- add page file with any text just for testing purposes
- update package.json > scripts > dev: to use turbo
- run
Reproduction Repo
No response
Please let me know if I can be of any assistance. I would love the opportunity to help solve this bug I just don't know where to look next.
Hey y'all, we're aware of this limitation. If you look very closely you'll see that we throw an error message about this support. We look forward to bringing support for this very soon!
https://github.com/vercel/turbo/blob/4c5cab2755444fd60aa91aaba798473e58de117b/crates/turbopack/src/lib.rs#L66-L67
#2545 and #2494 are both reporting the same thing. At this point it's not exactly a bug, more a known limitation, and internally we're tracking toward implementing it. @wbinnssmith is the person currently investigating it. 🔜
In the mean time this is a possible workaround to enable using fonts with Turbopack: https://nextjs.org/docs/messages/no-page-custom-font#possible-ways-to-fix-it
Thank you for taking the time to let me know I really appreciate it. @wbinnssmith If I can be of any assistance please let me know.
oh.. I have same issue