`@clerk/upgrade --release=core-3` exits with an npm ERESOLVE error on Next.js 14 instead of saying Next 15 is required
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, nextjs, node.js, typescript
Hướng nghiên cứu
Start by reading packages/upgrade/versions/core-3/index.js to see how sdkVersions is declared, then trace performUpgrade() and the main flow in packages/upgrade/cli.js, especially where the package-manager install runs before codemods. Add a pre-install check that reads the installed next version, compares it with the new SDK's peer range, and stops with the suggested message before any install or migration. Verify with a Next 14 fixture that the tool exits early without running npm or codemods, and with Next 15 that the upgrade proceeds.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue
@clerk/nextjs@7 declares the peer dependency next@"^15.2.8 || ^15.3.8 || ^15.4.10 || ^15.5.9 || ^15.6.0-0 || ^16.0.10 || ^16.1.0-0".
@clerk/upgrade never checks the installed next version before upgrading. On a Next 14 app,
npx @clerk/upgrade --sdk=nextjs --release=core-3 runs npm install @clerk/nextjs@7, npm rejects it, and the tool exits with:
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error Could not resolve dependency:
npm error peer next@"^15.2.8 || ^15.3.8 || ^15.4.10 || ^15.5.9 || ^15.6.0-0 || ^16.0.10 || ^16.1.0-0" from @clerk/[email protected]
✗ Failed to upgrade @clerk/nextjs
Where
packages/upgrade, as published in @clerk/[email protected]:
versions/core-3/index.js:sdkVersionsonly records the Clerk SDK's own versions (nextjs: { from: 6, to: 7 }).
There is no minimum framework version.cli.js,performUpgrade(): runs the package manager's install directly. When it fails, it prints the
package manager's output and callsprocess.exit(1).cli.js, the main flow: the package upgrade (step 6) runs before the codemods (step 7), so a failed
install means no codemods run.
Consequences
- The upgrade stops with nothing migrated: no codemods run and no breaking-change scan is done.
- The only explanation is npm's peer-dependency dump. Nothing says "upgrade Next.js to 15.2.8+ or 16 first",
so users have to work it out from npm's resolver output.
Suggested fix
Before step 6, read the installed framework version and compare it with the new SDK's peer range, e.g.
a peerRequirements: { nextjs: { next: '>=15.2.8' } } entry in versions/core-3. If it doesn't match, stop
before changing anything:
core-3 needs Next.js 15.2.8+ or 16. You have 14.2.16. Upgrade Next.js first, then rerun.
Found with modeval, which runs codemods against real repositories
that depend on a package and checks the results.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 493
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 359
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của clerk/javascript
-
<SignIn />: the reset password code step renders an empty, focusable back button with no accessible nameCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
clerk/javascript#10708 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Built-in reverification dialog lacks an accessible name (aria-dialog-name)Có thể đã có người làm @ItsShivam05 đã nhận 12 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
clerk/javascript#10548 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
MFA enrollment QR SVG lacks an accessible name (svg-img-alt)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
clerk/javascript#10547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
<SignIn />: first "Use email" click switches back to phone when `initialValues.phoneNumber` is setCó thể đã có người làm @twicestruck đã nhận 29 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
clerk/javascript#10487 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
useLoadedIsomorphicClerk misses "ready" when a ClerkProvider remounts after clerk-js has loaded — <ClerkLoading> never resolvesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
clerk/javascript#10462 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của clerk/javascript
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
superlinked/sie#1033 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
remix-run/react-router#15838 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/ci bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melgarafael/DeskcommCRM#5290 ·
Maintainer thường phản hồi trong vòng 1 ngày