-
Notifications
You must be signed in to change notification settings - Fork 65
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
Geist fonts don't work on pages
router, only on app
router
#59
Comments
To add on to this, this is also a valid workaround when trying to import Geist in client components while using Next.js App Router. I understand this seems to be more relevant to |
pages
, only on app
routerpages
router, only on app
router
I also had same #13 issue. I feel this should become the part of official documentation untill gets fixed in next version. |
I tripped over this problem as well - on pages router 14.0.4 |
how ironic that the font developed by vercel is not even fully supported in their own framework. switching back to inter for peace. |
I wish I could just switch back to inter for peace but PM in my team want Geist :( |
same here with all versions of next.js in pages route. |
Thanks for the temp solution, but yea I hope this gets fully solved. |
Still an issue in Nextjs 14.2.3 with pages router |
Use @sandeshbagade solution. It worked for me :), thank you very much! |
Setting
#114 is a WIP. |
OMG, Bless you |
Font Name (Geist Sans/Geist Mono):
Description of the Issue:
Geist fonts work only on
app
router but not onpages
router. Both Geist Sans and Mono show the following error onpages
router:"SyntaxError: Cannot use import statement outside a module"
Steps to Reproduce:
pages
routernpm i geist@latest
and import the font in_app.tsx
as docs mentionPages Router (errors):
App Router (works fine):
Expected Behavior:
Geist font should work, as expected, like it does with
app
router.Screenshots:
Environment:
NodeJS
runtime andnpm
as package manager1.1.0
(latest at time of writing)Additional Context:
15+ people from issue #13 faced the same issue mentioned here. But the issue was closed due to a temporary workaround found where adding
transpilePackages: ["geist"]
innext.config.js
fixed the issue. But this fix wasn't documented or mentioned anywhere in docs - nor is it an actual fix for the issue.StackBlitz links use Next.js 13.5.1, but the issue is the same and persists.
The text was updated successfully, but these errors were encountered: