Skip to content

Conversation

@bgw
Copy link

@bgw bgw commented Dec 18, 2025

Next 16.1 (specifically vercel/next.js#86576) should fix #1242. This updates the examples to use 16.1.

I tested this with pnpm turbo dev --filter @example/with-tailwindcss, which failed to compile on 16.0, but now compiles with 16.1.

Sorry about the breakage, and the delays in fixing it!

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Turbopack configuration support to build system.
  • Chores

    • Updated Next.js to version 16.1.0 across all example projects.
    • Updated React and React-DOM to version 19.2.3.
    • Updated TypeScript configurations to use react-jsx runtime for improved JSX handling.
    • Cleaned up and optimized project configuration files.

✏️ Tip: You can customize this high-level summary in your review settings.

bgw added 3 commits December 18, 2025 13:28
I noticed these examples would fail without this.

This could probably be installed as a global package, but adding it here
ensures the version is pinned to the project, and removes a setup step.
The `drizzle-kit` documentation seems to suggest adding it as a dev
dependency.
…to gitignore

- When running `next dev` or `next build`, Next 16.1 makes a small
  change and a bunch of formatting changes to `tsconfig.json`. Commit
  this.

- Because of `isolatedDevBuild` in 16.1 (https://nextjs.org/docs/app/api-reference/config/next-config-js/isolatedDevBuild)
  combined with `typedRoutes` (https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes),
  the `next-env.d.ts` is updated to different values depending on if you
  most recently ran `next dev` or `next build`. We recommend putting
  this file in your gitignore:
  https://github.com/vercel/next.js/blob/26cde2120ac741bbd3fed5f9d6ffa9569ceda3fd/packages/create-next-app/templates/app/ts/gitignore#L41
@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

⚠️ No Changeset found

Latest commit: 6f2ce3f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Dec 18, 2025

@bgw is attempting to deploy a commit to the Ping Labs Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Walkthrough

The PR updates multiple example projects to support Next.js 16 with Turbopack by: upgrading dependencies (Next.js to 16.1.0, React/React-DOM to 19.2.3), enabling Turbopack in Next.js configuration, changing TypeScript JSX runtime from "preserve" to "react-jsx", updating include paths for generated types, and clearing auto-generated next-env.d.ts files.

Changes

Cohort / File(s) Summary
Root configuration
.gitignore
Added next-env.d.ts to Next.js ignore section
Next.js environment declarations
examples/*/next-env.d.ts, playground*/next-env.d.ts
Removed TypeScript reference directives and comment headers from all environment declaration files
Next.js configuration
examples/minimal-appdir/next.config.js
Added empty turbopack: {} configuration object to enable Turbopack
Dependency version updates
examples/*/package.json, playground*/package.json
Bumped next 15.5.8 → 16.1.0, react/react-dom 19.2.2 → 19.2.3; added drizzle-kit 0.31.8 to drizzle examples' devDependencies
TypeScript configuration
examples/*/tsconfig.json, playground*/tsconfig.json
Changed jsx from "preserve" to "react-jsx", added ".next/dev/types/**/*.ts" to include, reformatted lib/plugins/paths/include/exclude arrays for multi-line layout

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Rationale: Homogeneous, repetitive changes across many files following consistent patterns. All TypeScript config updates apply the same transformations, all package.json updates are simple version bumps, and all next-env.d.ts removals are identical. The primary review focus is validating consistency rather than analyzing heterogeneous logic.
  • Areas needing attention:
    • Verify the JSX runtime change ("preserve" → "react-jsx") is appropriate for all example projects and won't break existing behavior
    • Confirm dependency version compatibility between Next.js 16.1.0 and React 19.2.3 across all examples
    • Validate that the Turbopack configuration addition (turbopack: {}) aligns with Next.js 16 defaults and resolves the Turbopack module resolution issues mentioned in issue #1242

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR updates examples to Next 16.1 per the objectives, but does not address the core coding requirements from issue #1242 (fixing UploadThing packages for Turbopack compatibility). The linked issue #1242 requires fixing UploadThing package exports, module formats, and Turbopack compatibility. This PR only updates examples but does not resolve the root cause compilation errors in the UploadThing packages themselves.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Out of Scope Changes check ✅ Passed Changes are focused on updating example projects (dependency versions, tsconfig formatting, next-env.d.ts removal, and Turbopack config) which align with the stated PR objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The pull request title 'chore: Update examples to Next 16.1' is clear, concise, and accurately summarizes the main change—upgrading Next.js in all example projects from 15.5.8 to 16.1.0.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
examples/with-clerk-pagesdir/package.json (1)

29-29: Update eslint-config-next to match Next.js version.

The eslint-config-next package is at version 15.5.8 while next has been upgraded to 16.1.0. This version mismatch may cause linting rule incompatibilities or missing rules specific to Next.js 16.

🔎 Suggested fix
-    "eslint-config-next": "15.5.8",
+    "eslint-config-next": "16.1.0",
examples/minimal-appdir/package.json (1)

19-19: Update @next/bundle-analyzer to match Next.js version.

The @next/bundle-analyzer package is at version 15.1.3 while next has been upgraded to 16.1.0. This version mismatch may cause compatibility issues with the bundle analysis tooling.

🔎 Suggested fix
-    "@next/bundle-analyzer": "15.1.3",
+    "@next/bundle-analyzer": "16.1.0",
examples/with-clerk-appdir/package.json (1)

29-29: Upgrade eslint-config-next and migrate ESLint setup for Next.js 16 compatibility.

Upgrading eslint-config-next to 16.0.10 (latest stable) is necessary, but this requires additional changes beyond a version bump. Starting with Next.js 16, the next lint command has been removed, and the eslint option in the Next.js config file is also removed. @next/eslint-plugin-next now defaults to ESLint Flat Config format, aligning with ESLint v10 which will drop legacy config support. This requires:

  • Creating or updating eslint.config.mjs with the flat config format
  • Removing the eslint option from next.config.js
  • Adding peer dependency eslint >= 9.0.0
  • Updating lint scripts in package.json to call ESLint directly
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c245897 and 6f2ce3f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (37)
  • .gitignore (1 hunks)
  • examples/minimal-appdir/next-env.d.ts (0 hunks)
  • examples/minimal-appdir/next.config.js (1 hunks)
  • examples/minimal-appdir/package.json (1 hunks)
  • examples/minimal-appdir/tsconfig.json (1 hunks)
  • examples/minimal-pagedir/next-env.d.ts (0 hunks)
  • examples/minimal-pagedir/package.json (1 hunks)
  • examples/minimal-pagedir/tsconfig.json (1 hunks)
  • examples/profile-picture/next-env.d.ts (0 hunks)
  • examples/profile-picture/package.json (1 hunks)
  • examples/profile-picture/tsconfig.json (1 hunks)
  • examples/with-clerk-appdir/next-env.d.ts (0 hunks)
  • examples/with-clerk-appdir/package.json (1 hunks)
  • examples/with-clerk-appdir/tsconfig.json (1 hunks)
  • examples/with-clerk-pagesdir/next-env.d.ts (0 hunks)
  • examples/with-clerk-pagesdir/package.json (1 hunks)
  • examples/with-clerk-pagesdir/tsconfig.json (1 hunks)
  • examples/with-drizzle-appdir/next-env.d.ts (0 hunks)
  • examples/with-drizzle-appdir/package.json (2 hunks)
  • examples/with-drizzle-appdir/tsconfig.json (1 hunks)
  • examples/with-drizzle-pagesdir/next-env.d.ts (0 hunks)
  • examples/with-drizzle-pagesdir/package.json (2 hunks)
  • examples/with-drizzle-pagesdir/tsconfig.json (1 hunks)
  • examples/with-novel/next-env.d.ts (0 hunks)
  • examples/with-novel/package.json (1 hunks)
  • examples/with-novel/tsconfig.json (1 hunks)
  • examples/with-react-image-crop/next-env.d.ts (0 hunks)
  • examples/with-react-image-crop/package.json (1 hunks)
  • examples/with-react-image-crop/tsconfig.json (1 hunks)
  • examples/with-serveractions/next-env.d.ts (0 hunks)
  • examples/with-serveractions/package.json (1 hunks)
  • examples/with-serveractions/tsconfig.json (1 hunks)
  • examples/with-tailwindcss/next-env.d.ts (0 hunks)
  • examples/with-tailwindcss/package.json (1 hunks)
  • examples/with-tailwindcss/tsconfig.json (1 hunks)
  • playground-v6/next-env.d.ts (0 hunks)
  • playground/next-env.d.ts (0 hunks)
💤 Files with no reviewable changes (13)
  • examples/minimal-pagedir/next-env.d.ts
  • playground/next-env.d.ts
  • examples/with-clerk-pagesdir/next-env.d.ts
  • examples/with-serveractions/next-env.d.ts
  • examples/minimal-appdir/next-env.d.ts
  • examples/profile-picture/next-env.d.ts
  • playground-v6/next-env.d.ts
  • examples/with-drizzle-pagesdir/next-env.d.ts
  • examples/with-react-image-crop/next-env.d.ts
  • examples/with-drizzle-appdir/next-env.d.ts
  • examples/with-novel/next-env.d.ts
  • examples/with-tailwindcss/next-env.d.ts
  • examples/with-clerk-appdir/next-env.d.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-11-07T18:28:14.191Z
Learnt from: juliusmarminge
Repo: pingdotgg/uploadthing PR: 1046
File: playground/package.json:26-26
Timestamp: 2024-11-07T18:28:14.191Z
Learning: In `package.json`, the `typescript-eslint` package is correctly used and should not be replaced with `typescript-eslint/eslint-plugin` and `typescript-eslint/parser` in modern configurations.

Applied to files:

  • examples/with-serveractions/tsconfig.json
🔇 Additional comments (32)
examples/with-clerk-pagesdir/tsconfig.json (2)

15-15: Correct JSX runtime for React 19 compatibility.

Changing jsx from "preserve" to "react-jsx" aligns with React 19's modern JSX Transform requirement. This is necessary for Next.js 16 with React 19.2.3.


28-33: Verify the .next/types include path for Next.js 16.1 type generation.

The enriched summary indicates that .next/dev/types/**/*.ts should be added to the include paths, but the actual code shows .next/types/**/*.ts. These are different paths with distinct implications for type generation during development vs. build stages.

Given the PR note about isolatedDevBuild/typedRoutes behavior differences in Next.js 16.1, confirm whether .next/types/**/*.ts adequately covers both dev and build type generation, or if both .next/dev/types/**/*.ts and .next/types/**/*.ts are needed.

examples/with-react-image-crop/tsconfig.json (3)

3-7: LGTM: Formatting improvements.

The multi-line array and object formatting improves readability with no functional changes to lib, plugins, paths, or exclude configurations.

Also applies to: 17-21, 23-26, 35-37


28-34: Remove .next/dev/types from tsconfig.json include array

The standard @tsconfig/next configuration only includes .next/types/**/*.ts, and Next.js generates a .d.ts file in .next/types for environment variables. The addition of .next/dev/types appears to stem from a bug reported in Next.js 16 canary where the system incorrectly attempted to add .next/dev/types/**/*.ts multiple times to tsconfig. This path is not documented in the official Next.js 16 configuration guidance and should be removed.

Likely an incorrect or invalid review comment.


15-15: JSX runtime change is correct for React 19.

The change from "preserve" to "react-jsx" aligns with React 19.2.3 and the automatic JSX transform. This change is fully compatible with all of the existing JSX code, and all components in this example use standard JSX patterns without any legacy patterns that would cause issues with the automatic runtime.

.gitignore (1)

22-22: LGTM! Aligns with Next.js best practices.

Adding next-env.d.ts to .gitignore is correct, as this file is auto-generated by Next.js and should not be committed to version control.

examples/profile-picture/package.json (1)

23-23: Dependency updates look consistent.

The Next.js and React version updates align with the PR objectives. Ensure these changes are tested with the Turbopack mode mentioned in the linked issue.

Also applies to: 26-27

examples/with-serveractions/package.json (1)

12-14: Dependency updates look consistent.

The version updates align with the PR objectives to support Next.js 16.1 and React 19.2.3.

examples/minimal-appdir/package.json (1)

13-15: Dependency updates look consistent.

The Next.js and React version updates align with the PR objectives.

examples/minimal-pagedir/package.json (1)

13-15: Dependency updates look consistent.

The version updates align with the PR objectives.

examples/with-drizzle-appdir/package.json (2)

19-21: Dependency updates look consistent.

The Next.js and React version updates align with the PR objectives.


30-30: Good addition of drizzle-kit to devDependencies.

Adding drizzle-kit ensures the example can build without requiring a global installation, improving the developer experience.

examples/with-novel/package.json (1)

17-17: Dependency updates look consistent.

The Next.js and React version updates align with the PR objectives.

Also applies to: 21-22

examples/with-clerk-pagesdir/package.json (1)

17-19: Address Next.js 16 peer dependency gaps before upgrading.

This PR upgrades from Next.js 15.5.8 to 16.1.0, a major version with significant breaking changes. While Next.js 16 uses React 19.2 features, there are two critical considerations:

  1. @clerk/nextjs compatibility: @clerk/nextjs peer dependencies currently do not include Next.js 16 support, which may cause npm warnings during installation despite functional compatibility.

  2. eslint-config-next version mismatch: Update eslint-config-next from 15.5.8 to 16.x to align with Next.js 16. Next.js 16 removes the next lint command, requiring direct ESLint setup.

  3. Breaking changes to address: Synchronous access to request APIs is fully removed; these can only be accessed asynchronously. Verify all components handle async params/searchParams appropriately.

⛔ Skipped due to learnings
Learnt from: markflorkowski
Repo: pingdotgg/uploadthing PR: 1138
File: playground/package.json:27-27
Timestamp: 2025-01-24T01:57:53.903Z
Learning: When reviewing package versions, verify the latest version from the npm registry instead of making assumptions about version availability. Package versions can change frequently, and cached knowledge about versions can become outdated quickly.
examples/with-clerk-appdir/tsconfig.json (2)

15-15: JSX runtime change is correct for Next.js 16.

The change from "preserve" to "react-jsx" aligns with Next.js 16's requirement to use the modern JSX transform introduced in React 17+.


28-34: Include paths correctly support both build and dev mode.

The addition of .next/dev/types/**/*.ts alongside the existing .next/types/**/*.ts ensures TypeScript picks up generated types in both development (next dev) and production build (next build) modes, which is necessary for Next.js 16's isolatedDevBuild/typedRoutes behavior.

examples/with-tailwindcss/package.json (1)

13-15: Dependency upgrades look correct.

The version bumps to Next.js 16.1.0 and React 19.2.3 align with the PR objectives and should resolve the Turbopack compilation issues reported in #1242.

examples/minimal-pagedir/tsconfig.json (1)

28-33: Missing .next/dev/types/**/*.ts in include - inconsistent with other examples.

Other tsconfig files in this PR (e.g., with-clerk-appdir, with-novel, profile-picture) add .next/dev/types/**/*.ts to the include array. This file only has .next/types/**/*.ts.

If this is intentional because Pages Router examples don't need dev types, the inconsistency is fine. Otherwise, consider adding it for consistency:

   "include": [
     ".next/types/**/*.ts",
     "next-env.d.ts",
     "src",
-    "*.js"
+    "*.js",
+    ".next/dev/types/**/*.ts"
   ],
examples/with-clerk-appdir/package.json (1)

17-19: Core dependency upgrades look correct.

The version bumps align with the PR objectives for Next.js 16.1 support.

examples/with-novel/tsconfig.json (1)

3-37: LGTM!

The tsconfig changes are consistent with the Next.js 16.1 upgrade requirements:

  • JSX runtime correctly set to "react-jsx"
  • Both .next/types/**/*.ts and .next/dev/types/**/*.ts included for build and dev mode type support
examples/profile-picture/tsconfig.json (1)

3-37: LGTM!

The tsconfig changes correctly implement the Next.js 16.1 requirements with the JSX runtime update and both dev/build type includes.

examples/with-drizzle-appdir/tsconfig.json (2)

3-26: LGTM! JSX runtime update aligns with React 19.

The change from "preserve" to "react-jsx" correctly enables the automatic JSX runtime required for React 19. The formatting improvements to lib, plugins, and paths enhance readability.


28-34: Correct addition of Next.js 16 dev types path.

Adding ".next/dev/types/**/*.ts" ensures TypeScript recognizes types generated during next dev in Next.js 16, which is necessary for the new type generation behavior.

examples/minimal-appdir/next.config.js (1)

8-8: LGTM! Minimal Turbopack enablement.

The empty turbopack: {} configuration enables Turbopack with default settings, which is appropriate for testing Next.js 16's production-ready Turbopack support.

examples/with-drizzle-pagesdir/package.json (2)

19-21: LGTM! Dependency upgrades align with Next.js 16 and React 19.

The version bumps to Next.js 16.1.0 and React 19.2.3 are consistent with the PR objectives and address the Turbopack compilation issues mentioned in the linked issue.


31-31: Good addition of drizzle-kit to devDependencies.

Adding drizzle-kit ensures the example can build standalone without requiring a global installation, which improves developer experience. drizzle-kit@0.31.0 can be used with drizzle-orm@0.31.0 or higher, so drizzle-kit 0.31.8 is fully compatible with the specified drizzle-orm ^0.38.3.

examples/with-serveractions/tsconfig.json (2)

3-26: LGTM! Consistent Next.js 16 TypeScript configuration.

The JSX runtime change to "react-jsx" and formatting improvements are consistent with the other examples and correctly support React 19.


28-34: Correct inclusion of dev types path.

Adding ".next/dev/types/**/*.ts" properly supports Next.js 16's development type generation.

examples/minimal-appdir/tsconfig.json (1)

15-15: LGTM! TypeScript configuration updated for Next.js 16 and React 19.

The JSX runtime change and addition of ".next/dev/types/**/*.ts" are both correct and necessary for Next.js 16 compatibility.

Also applies to: 28-34

examples/with-tailwindcss/tsconfig.json (1)

15-15: LGTM! Configuration changes align with Next.js 16 requirements.

The JSX runtime update and dev types inclusion are consistent with the other examples and properly configured.

Also applies to: 28-34

examples/with-drizzle-pagesdir/tsconfig.json (2)

15-15: LGTM! JSX runtime correctly updated.

The change to "react-jsx" properly enables React 19's automatic JSX runtime.


28-33: Pages Router examples are missing .next/dev/types/**/*.ts from include array.

All Pages Router examples (minimal-pagedir, with-clerk-pagesdir, with-drizzle-pagesdir) consistently omit .next/dev/types/**/*.ts from their tsconfig.json include array, while all App Router examples (minimal-appdir, with-clerk-appdir, with-drizzle-appdir, with-serveractions) include it. Verify whether this is intentional—if Pages Router does not require dev types—or if the path should be added to maintain consistency across example configurations.

"@types/react-dom": "19.2.3",
"drizzle-kit": "0.31.8",
"eslint": "9.25.1",
"eslint-config-next": "15.5.8",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Update eslint-config-next to match Next.js version.

The eslint-config-next package is at version 15.5.8 while next has been upgraded to 16.1.0. This version mismatch may cause linting rule incompatibilities.

🔎 Suggested fix
-    "eslint-config-next": "15.5.8",
+    "eslint-config-next": "16.1.0",

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In examples/with-drizzle-appdir/package.json around line 32, eslint-config-next
is pinned to 15.5.8 while Next.js is 16.1.0; update the eslint-config-next
dependency to a version compatible with Next.js 16 (e.g., "^16.1.0" or the exact
Next.js minor match) in package.json and run npm/yarn install to update lockfile
so lint rules align with the Next.js version.

Comment on lines +13 to +15
"next": "16.1.0",
"react": "19.2.3",
"react-dom": "19.2.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Next.js 16.1.0 is not available as a stable release on npm—only canary versions exist.

The latest stable Next.js version available is 16.0.10, released 6 days ago. Next.js 16.1.0 only exists as canary builds (e.g., v16.1.0-canary.34 as of December 18). While Next.js 16.1 focuses on faster development workflows and improved stability, the stable release is not yet published to npm.

React 19.2.3 is confirmed available on npm, last published 6 days ago. This version is safe—fixes were backported to versions 19.0.3, 19.1.4, and 19.2.3 for critical React Server Component vulnerabilities.

Update the Next.js version to 16.0.10 or wait for 16.1.0 stable release before merging.

🤖 Prompt for AI Agents
examples/with-react-image-crop/package.json lines 13-15: The package.json pins
"next" to 16.1.0 which is not a stable npm release; change the Next.js
dependency to the latest stable release "16.0.10" (or alternatively revert to a
caret/tilde range that resolves to 16.0.10) and keep "react" and "react-dom" at
19.2.3 as-is, or delay merging until an official 16.1.0 stable is published.

@markflorkowski markflorkowski changed the title Update examples to Next 16.1 chore: Update examples to Next 16.1 Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: UploadThing packages fail to compile with Next.js 16 Turbopack mode

1 participant