Repository: next.js
Issue: Next Font: {randomlowercaseletter}.default / {randomlowercaseletter}.{name of a google font} is not a function
Labels: bug,Font (next/font)

### Link to the code that reproduces this issue

https://github.com/JackatDJL/Athenetz-SV/tree/athe-12-next-font-randomlowercaseletterdefault

### To Reproduce

git clone https://github.com/JackatDJL/Athenetz-SV.git
cd Athenetz-SV
git fetch
git checkout athe-12-next-font-randomlowercaseletterdefault
corepack enable
yarn install
yarn build

### Current vs. Expected behavior

Im in Pain ;(

i traced the issue to somewhere in next/font
if i use …/google with a google font like oxanium i get this error (tested on windows, linux and vercel) {}.{fontname}

```
@athenetz-sv/wahlen:build: at 59962 (/vercel/path0/apps/wahlen/.next/server/app/page.js:54:122230)
00:24:41.560@athenetz-sv/wahlen:build: at t (/vercel/path0/apps/wahlen/.next/server/webpack-runtime.js:1:128)
00:24:41.560@athenetz-sv/wahlen:build: at 11215 (/vercel/path0/apps/wahlen/.next/server/app/page.js:54:121166)
00:24:41.560@athenetz-sv/wahlen:build: at t (/vercel/path0/apps/wahlen/.next/server/webpack-runtime.js:1:128)
00:24:41.560@athenetz-sv/wahlen:build: at 26658 (/vercel/path0/apps/wahlen/.next/server/app/page.js:1:3999)
00:24:41.560@athenetz-sv/wahlen:build: at Object.t [as require] (/vercel/path0/apps/wahlen/.next/server/webpack-runtime.js:1:128)
00:24:41.560@athenetz-sv/wahlen:build: at require (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:18228)
00:24:41.560@athenetz-sv/wahlen:build: at i (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:88294)
00:24:41.560@athenetz-sv/wahlen:build: at /vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:98817
00:24:41.560@athenetz-sv/wahlen:build: at /vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:98904
00:24:41.560@athenetz-sv/wahlen:build: Generating static pages (3/4)
00:24:41.560@athenetz-sv/wahlen:build: ✓ Generating static pages (4/4)
00:24:41.584@athenetz-sv/wahlen:build:
00:24:41.584@athenetz-sv/wahlen:build: > Export encountered errors on following paths:
00:24:41.585@athenetz-sv/wahlen:build: /page: /
00:24:41.677@athenetz-sv/wahlen:build: ERROR: command finished with error: command (/vercel/path0/apps/wahlen) /yarn1/node_modules/yarn/bin/yarn run build exited (1)
00:24:41.677@athenetz-sv/wahlen#build: command (/vercel/path0/apps/wahlen) /yarn1/node_modules/yarn/bin/yarn run build exited (1)
00:24:41.680
00:24:41.680 Tasks: 5 successful, 6 total
00:24:41.680 Cached: 5 cached, 6 total
00:24:41.680 Time: 21.098s
00:24:41.681Summary: /vercel/path0/.turbo/runs/2mfmD52ot720RrLjZ4R4lRNAc7Y.json
00:24:41.681 Failed: @athenetz-sv/wahlen#build
00:24:41.681
```

and if i try to use localfonts instead i get {}.default
```
@athenetz-sv/wahlen:build: TypeError: (0 , r.default) is not a function
01:18:56.873@athenetz-sv/wahlen:build: at 40134 (/vercel/path0/apps/wahlen/.next/server/app/_not-found/page.js:1:6048)
01:18:56.873@athenetz-sv/wahlen:build: at t (/vercel/path0/apps/wahlen/.next/server/webpack-runtime.js:1:128)
01:18:56.873@athenetz-sv/wahlen:build: at 77718 (/vercel/path0/apps/wahlen/.next/server/app/_not-found/page.js:1:3036)
01:18:56.873@athenetz-sv/wahlen:build: at t (/vercel/path0/apps/wahlen/.next/server/webpack-runtime.js:1:128)
01:18:56.873@athenetz-sv/wahlen:build: at 53219 (/vercel/path0/apps/wahlen/.next/server/app/_not-found/page.js:1:645)
01:18:56.873@athenetz-sv/wahlen:build: at t (/vercel/path0/apps/wahlen/.next/server/webpack-runtime.js:1:128)
01:18:56.874@athenetz-sv/wahlen:build: at o (/vercel/path0/apps/wahlen/.next/server/app/_not-found/page.js:1:6651)
01:18:56.874@athenetz-sv/wahlen:build: at /vercel/path0/apps/wahlen/.next/server/app/_not-found/page.js:1:6677
01:18:56.874@athenetz-sv/wahlen:build: at t.X (/vercel/path0/apps/wahlen/.next/server/webpack-runtime.js:1:1196)
01:18:56.874@athenetz-sv/wahlen:build: at /vercel/path0/apps/wahlen/.next/server/app/_not-found/page.js:1:6664
01:18:56.875@athenetz-sv/wahlen:build:
01:18:56.875@athenetz-sv/wahlen:build: > Build error occurred
01:18:56.877@athenetz-sv/wahlen:build: Error: Failed to collect page data for /_not-found
01:18:56.878@athenetz-sv/wahlen:build: at /vercel/path0/node_modules/next/dist/build/utils.js:1268:15
01:18:56.878@athenetz-sv/wahlen:build: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
01:18:56.878@athenetz-sv/wahlen:build: type: 'Error'
01:18:56.878@athenetz-sv/wahlen:build: }
01:18:56.973@athenetz-sv/wahlen:build: ERROR: command finished with error: command (/vercel/path0/apps/wahlen) /yarn1/node_modules/yarn/bin/yarn run build exited (1)
01:18:56.973@athenetz-sv/wahlen#build: command (/vercel/path0/apps/wahlen) /yarn1/node_modules/yarn/bin/yarn run build exited (1)
01:18:56.976
01:18:56.976 Tasks: 5 successful, 6 total
01:18:56.977 Cached: 0 cached, 6 total
01:18:56.977 Time: 1m17.159s
01:18:56.977Summary: /vercel/path0/.turbo/runs/2mfso4wRRMrIX3sJrwMoSfT5u1K.json
01:18:56.977 Failed: @athenetz-sv/wahlen#build
```

These are the outputs from vercel with version 14.2.12
and this is the local output with version 15.0.0-canary.172

```
┌ @athenetz-sv/wahlen#build > cache miss, executing 9f037a7a61ca03e7
│   ▲ Next.js 15.0.0-canary.172
│   - Environments: .env.local
│
│    Creating an optimized production build ...
│  ⚠ Compiled with warnings
│
│ ../../node_modules/framer-motion/dist/cjs/index.js
│ Module not found: Can't resolve '@emotion/is-prop-valid' in 'D:\dev\Athenetz-SV\node_modules\framer-motion\dist\cjs'
│
│ Import trace for requested module:
│ ../../node_modules/framer-motion/dist/cjs/index.js
│ ../../packages/SV-UI/dist/layout/FloatingPanel.js
│ ./src/app/page.tsx
│
│  ✓ Linting and checking validity of types
│    Collecting page data  ..TypeError: (0 , o.default) is not a function
│     at 21459 (D:\dev\Athenetz-SV\apps\wahlen.next\server\app_not-found\page.js:1:5028)
│     at t (D:\dev\Athenetz-SV\apps\wahlen.next\server\webpack-runtime.js:1:128)
│     at D:\dev\Athenetz-SV\apps\wahlen.next\server\app_not-found\page.js:1:3096
│     at t.a (D:\dev\Athenetz-SV\apps\wahlen.next\server\webpack-runtime.js:1:881)
│     at 76560 (D:\dev\Athenetz-SV\apps\wahlen.next\server\app_not-found\page.js:1:2837)
│     at Function.t (D:\dev\Athenetz-SV\apps\wahlen.next\server\webpack-runtime.js:1:128)
│     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
│     at async collectGenerateParams (D:\dev\Athenetz-SV\node_modules\next\dist\build\utils.js:937:21)
│     at async D:\dev\Athenetz-SV\node_modules\next\dist\build\utils.js:1172:17
│     at async Span.traceAsyncFn (D:\dev\Athenetz-SV\node_modules\next\dist\trace\trace.js:157:20)
│
│ > Build error occurred
│ Error: Failed to collect page data for /_not-found
│     at D:\dev\Athenetz-SV\node_modules\next\dist\build\utils.js:1272:15
│     at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
│   type: 'Error'
│ }
│    Collecting page data  .
│                           command finished with error: command (D:\dev\Athenetz-SV\apps\wahlen) C:\Users\jackr\AppData\Local\Temp\xfs-cd78823a\yarn.cmd run build ex
│ ited (1)
└────>
```

@athenetz-sv/wahlen#build: command (D:\dev\Athenetz-SV\apps\wahlen) C:\Users\jackr\AppData\Local\Temp\xfs-cd78823a\yarn.cmd run build exited (1)
ty for reading the entire thing ❤

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 32760
  Available CPU cores: 12
Binaries:
  Node: 22.9.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.172
  eslint-config-next: 14.2.13
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.6.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Font (next/font)

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), Vercel (Deployed)

### Additional context

Original issue with Next.js 14.2.12
Still a issue in Next.js v15.0.0-canary.172
i traced the issue to somewhere in next/font
tested and failed on windows, linux (codepace) and vercel