[URGENT] Build fails on NodeHub due to Next.js/Clerk peer dependency conflict #1

Closed
opened 2026-04-10 20:07:06 +00:00 by Mark · 1 comment
Owner

Issue

The application fails to build on NodeHub (https://nodehub.tail018ac4.ts.net) with the following error:

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error While resolving: @clerk/nextjs@7.0.12
npm error Found: next@14.2.35
npm error Could not resolve dependency:
npm error peer next@"^15.2.8 || ^15.3.8 || ^15.4.10 || ^15.5.9 || ^16.0.10 || ^16.1.0-0"

Root Cause

  • Current Next.js version: 14.2.35
  • Current @clerk/nextjs version: 7.0.12
  • @clerk/nextjs v7 requires Next.js 15 or 16 (not Next.js 14)

Solutions

npm install next@latest
npm install -D @types/react @types/react-dom  # May need these updated too

Then push to trigger a new deployment.

Option 2: Downgrade Clerk to v4 (If staying on Next.js 14)

npm install @clerk/nextjs@4

Note: Clerk v4 is deprecated and will lose support.

Modify the Dockerfile to use --legacy-peer-deps flag, but this masks the real problem.

Quick Action

Run locally to verify:

npm ci --legacy-peer-deps  # Test if this works locally

Then deploy from working branch. Ideally fix the dependencies properly.

## Issue The application fails to build on NodeHub (https://nodehub.tail018ac4.ts.net) with the following error: ``` npm error code ERESOLVE npm error ERESOLVE could not resolve npm error While resolving: @clerk/nextjs@7.0.12 npm error Found: next@14.2.35 npm error Could not resolve dependency: npm error peer next@"^15.2.8 || ^15.3.8 || ^15.4.10 || ^15.5.9 || ^16.0.10 || ^16.1.0-0" ``` ## Root Cause - Current Next.js version: `14.2.35` - Current @clerk/nextjs version: `7.0.12` - @clerk/nextjs v7 requires Next.js 15 or 16 (not Next.js 14) ## Solutions ### Option 1: Upgrade Next.js (Recommended) ```bash npm install next@latest npm install -D @types/react @types/react-dom # May need these updated too ``` Then push to trigger a new deployment. ### Option 2: Downgrade Clerk to v4 (If staying on Next.js 14) ```bash npm install @clerk/nextjs@4 ``` Note: Clerk v4 is deprecated and will lose support. ### Option 3: Quick Fix in Dockerfile (Not Recommended) Modify the Dockerfile to use `--legacy-peer-deps` flag, but this masks the real problem. ## Quick Action Run locally to verify: ```bash npm ci --legacy-peer-deps # Test if this works locally ``` Then deploy from working branch. Ideally fix the dependencies properly.
Author
Owner

Fixed locally.

Resolution: Downgraded @clerk/nextjs from ^7.0.12 to ^6.39.3 (v6 is compatible with Next.js 14).

npm install now completes successfully and next lint passes. Ready to push.

Fixed locally. **Resolution:** Downgraded `@clerk/nextjs` from `^7.0.12` to `^6.39.3` (v6 is compatible with Next.js 14). `npm install` now completes successfully and `next lint` passes. Ready to push.
Mark closed this issue 2026-05-05 01:48:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AuWoMe/planish#1
No description provided.