fix(example): update nextjs example dependencies to latest versions - #313
Conversation
Update next.js from 12.x to 16.x, React from 18.x to 19.x, ESLint from 8.x to 9.x, and Vercel CLI from 25.x to 41.x. This fixes the CI build failure caused by Vercel CLI 25.x not supporting Node.js 22+.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on updating the dependencies within the Next.js example application to their most recent versions. The primary motivation for these updates is to rectify existing CI build failures, specifically those arising from compatibility issues between older Vercel CLI versions and newer Node.js environments, ensuring the example remains functional and buildable. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Deploy preview for team-scope-test ready! ✅ Preview Built with commit e6b0698. |
|
|
Deploy preview for express-basic-auth ready! ✅ Preview Built with commit e6b0698. |
There was a problem hiding this comment.
Code Review
This pull request updates several dependencies in example/nextjs/package.json, including next, react, react-dom, vercel, eslint, and eslint-config-next. A critical issue was identified where several of the specified dependency versions, such as next 16.2.1 and react 19.2.4, are invalid and do not exist on the public npm registry, which will prevent pnpm install from succeeding. The author needs to verify and correct these dependency versions.
There was a problem hiding this comment.
No issues found across 2 files
Requires human review: Major version updates for Next.js and React, along with significant lockfile changes, require human review to ensure compatibility and correct behavior.
Architecture diagram
sequenceDiagram
participant Dev as Developer / CI
participant CLI as Vercel CLI (v41)
participant Node as Node.js Runtime (v22)
participant Next as Next.js (v16)
participant React as React (v19)
participant Browser as Client Browser
Note over Dev,Node: Build Time Flow (Fixed Build Failure)
Dev->>CLI: Run "vercel build"
CLI->>Node: CHANGED: Check Node.js version compatibility
alt Node version >= 22
Node-->>CLI: Success: Supported by Vercel CLI 41.x
else Node version < 22 (Previous State)
Node-->>CLI: Error: "Found invalid Node.js Version"
end
CLI->>Next: Execute "next build"
Next->>Next: Compile Application Code
Next->>React: NEW: Render components using React 19 APIs
React-->>Next: Generated Static/Server Assets
Next-->>CLI: Build Bundle
CLI-->>Dev: Deployment Ready
Note over Next,Browser: Runtime Request Flow
Browser->>Next: Request Page / Route
Next->>Next: Resolve Server Components / Middleware
Next->>React: NEW: Perform Server-Side Rendering (React 19)
React-->>Next: HTML / RSC Payload
Next-->>Browser: Send Response
loop Client Hydration
Browser->>React: NEW: Hydrate DOM with React 19
Note right of React: Improved hydration & form actions
end
There was a problem hiding this comment.
Pull request overview
Updates the Next.js example to modern dependency versions so the example-nextjs CI job can build under the repo’s current Node.js runtime (Node 24) and newer Vercel CLI requirements.
Changes:
- Bumps Next.js example runtime deps:
next→ 16.2.1,react/react-dom→ 19.2.4,vercel→ ^41.1.4 - Updates Next.js example lint tooling:
eslint→ 9.34.0,eslint-config-next→ 16.2.1 - Regenerates
pnpm-lock.yamlto reflect updated dependency graph
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks updated Next.js/React/Vercel/ESLint dependency tree for reproducible installs/builds. |
| example/nextjs/package.json | Updates Next.js example dependencies/devDependencies to versions compatible with current CI Node runtime. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



Summary
vercel buildto fail with "Found invalid Node.js Version: 22.x"Test plan
pnpm run lintpassespnpm testpassesnext buildsucceeds in example/nextjsexample-nextjspasses