Skip to content

Fix Next 15 production build (next/font and tinykeys) - #399

Open
dingyi wants to merge 2 commits into
masterfrom
cursor/fix-next-font-tinykeys-7768
Open

dingyi wants to merge 2 commits into
masterfrom
cursor/fix-next-font-tinykeys-7768

Conversation

@dingyi

@dingyi dingyi commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Summary

Production pnpm run build on Next 15.1 dies while collecting page data. pages/_app.tsx imports Albert_Sans from @next/font/google, and components/CommandMenu/index.tsx default-imports tinykeys 3.0.0, which only has a named export. This is the failure on deployment dpl_HseVxHXXzrxquFzeGnAYaWHox7QE (commit 7e17620). Canonical / og:url behavior from #398 is unchanged.

  • Use next/font/google for Albert_Sans and for Unbounded in components/PageTitle/index.tsx (the other @next/font import). Pass subsets: ['latin'], which is what experimental.fontLoaders declared. Next 15 already ignores that key.
  • Remove the @next/font dependency and the unused fontLoaders config.
  • Switch to import { tinykeys } from "tinykeys".
  • Load @calcom/embed-react inside the existing useEffect. v1.5.1 reads React 18 internals at import time and throws under React 19 (ReactCurrentOwner / ReactCurrentDispatcher). That crash was hidden behind the font error and stops page-data collection for /. No dependency upgrade.

Verification

pnpm run build on this branch:

  • Compiles successfully. The @next/font/google failed to run or is incorrectly configured error and the tinykeys default-export warning are gone.
  • Page-data collection succeeds, including /.
  • Static generation then fails locally on /gear with Notion APIResponseError: Authorization header must use the format "Bearer <token>" because this environment has no NOTION_API_KEY. The Vercel project already defines NOTION_API_KEY, the Notion database ids, and the Raindrop/Spotify variables for production, so that failure should not reproduce on Vercel.

This PR was generated automatically by Cursor.

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 27, 2026 10:54
@next/font crashes while collecting page data on Next 15.1. Use
next/font/google with the latin subset previously set in fontLoaders,
drop the unused package, and import tinykeys 3 as a named export.

Co-authored-by: Ding Yi <dingyimac@gmail.com>
@calcom/embed-react 1.5.1 reads React 18 internals at import time, so
the homepage fails page-data collection under React 19. The embed was
already initialized inside useEffect.

Co-authored-by: Ding Yi <dingyimac@gmail.com>
@codesandbox

codesandbox Bot commented Oct 27, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web Editor • VS Code • Insiders

Open Preview

@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ding-one Error Error Oct 27, 2026 10:55am UTC

@code-terrier

code-terrier Bot commented Oct 27, 2026

Copy link
Copy Markdown

You have reached your Code Terrier usage limits for code reviews. You can see your limits in the dashboard.

Open in Code Terrier

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T10:56:26.299890Z 2db9ed4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@what-the-diff

what-the-diff Bot commented Oct 27, 2026

Copy link
Copy Markdown

PR Summary

  • Prevents production build failures in the Cal integration by loading its embed library dynamically, avoiding a conflict with React internals.
  • Updates font and keyboard shortcut imports to use current Next.js and package conventions.
  • Removes outdated font-loading setup and dependencies, keeping the project’s configuration and dependency list up to date.

This branch had an error being deployed

1 failed deployment
Preview — 2db9ed43 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants