-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
An error occurred in next/font
. TypeError: Cannot read properties of undefined (reading 'ascent')
#69748
Comments
This comment has been minimized.
This comment has been minimized.
…9806) There's code that uses `glob` to find all template files and replaces the default import alias with whatever is specified during CNA. This does so without excluding fonts, and so we're unintentionally corrupting these `woff` files. This wasn't a problem in previous versions because we didn't use `localFont` in the default template, just `Inter`. The files were technically still being corrupted it just never manifested unless you went to actually use them. This is a quick fix to introduce minimal changes but ideally in a follow-up we should figure out a better solution for replacing aliases, ie by using an allowlist rather than an exclude list. h/t to @lubieowoce for the thorough test cases Fixes #69748 --------- Co-authored-by: Janka Uryga <lolzatu2@gmail.com>
…9806) There's code that uses `glob` to find all template files and replaces the default import alias with whatever is specified during CNA. This does so without excluding fonts, and so we're unintentionally corrupting these `woff` files. This wasn't a problem in previous versions because we didn't use `localFont` in the default template, just `Inter`. The files were technically still being corrupted it just never manifested unless you went to actually use them. This is a quick fix to introduce minimal changes but ideally in a follow-up we should figure out a better solution for replacing aliases, ie by using an allowlist rather than an exclude list. h/t to @lubieowoce for the thorough test cases Fixes #69748 --------- Co-authored-by: Janka Uryga <lolzatu2@gmail.com>
…9806) There's code that uses `glob` to find all template files and replaces the default import alias with whatever is specified during CNA. This does so without excluding fonts, and so we're unintentionally corrupting these `woff` files. This wasn't a problem in previous versions because we didn't use `localFont` in the default template, just `Inter`. The files were technically still being corrupted it just never manifested unless you went to actually use them. This is a quick fix to introduce minimal changes but ideally in a follow-up we should figure out a better solution for replacing aliases, ie by using an allowlist rather than an exclude list. h/t to @lubieowoce for the thorough test cases Fixes #69748 --------- Co-authored-by: Janka Uryga <lolzatu2@gmail.com>
Looks like it was backported to 14.2.9, but i still have the same error I have also tried to remove
EditMy bad, I had to do a new 🎉 👌 |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/chris-garrett/next-font-issue
To Reproduce
Create a new app and run pnpm dev
Current vs. Expected behavior
I would expect a new app created with create-next-app and unmodified to run without errors.
Provide environment information
$ npx --no-install next info Operating System: Platform: linux Arch: x64 Version: #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2 Available memory (MB): 64212 Available CPU cores: 24 Binaries: Node: 21.5.0 npm: 10.2.4 Yarn: 1.22.22 pnpm: 9.8.0 Relevant Packages: next: 14.2.8 // Latest available version is detected (14.2.8). eslint-config-next: 14.2.8 react: 18.3.1 react-dom: 18.3.1 typescript: 5.5.4 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
create-next-app
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The text was updated successfully, but these errors were encountered: