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

Fix "Can't resolve 'next/font/local/target.css'" #29

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

satococoa
Copy link
Contributor

Summary

Fix "Can't resolve 'next/font/local/target.css'"

Currently, you will encounter the above error when running bun dev and opening http://localhost:3000 due to the absence of the actual font file. Since Rosart is a proprietary font, I have modified how fonts are handled in the development and preview environments.

Changes

  • Created prepare-font.js
  • Configured it to run before bun dev and build

Copy link

vercel bot commented Oct 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
giselle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 21, 2024 7:26am

Got this warning.

```
Preload is enabled but no subsets were specified for font `Roboto Serif`. Please specify subsets or disable preloading if your intended subset can't be preloaded.
Available subsets: `cyrillic`, `cyrillic-ext`, `latin`, `latin-ext`, `vietnamese`
```
style: "normal",
},
],
import { Roboto_Serif } from "next/font/google";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't given much thought to using Roboto.
Any font is fine with me.

@shige shige added the bug Something isn't working label Oct 21, 2024
Copy link
Member

@shige shige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🆙

@satococoa satococoa merged commit 5b0181d into main Oct 21, 2024
7 checks passed
@satococoa satococoa deleted the fix-font-resolve-error branch October 21, 2024 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants