Skip to content

Fix CI: resolve nodemailer v8 / next-auth v4 peer dependency conflict#113

Merged
DarkModder33 merged 4 commits intomainfrom
copilot/fix-bug-in-application
Apr 11, 2026
Merged

Fix CI: resolve nodemailer v8 / next-auth v4 peer dependency conflict#113
DarkModder33 merged 4 commits intomainfrom
copilot/fix-bug-in-application

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

npm ci fails in CI because next-auth@4.24.13 declares an optional peer dep on nodemailer@^7.0.7, but the project pins nodemailer@^8.0.5 — npm 7+ treats this as an unresolvable conflict and exits non-zero.

Changes

  • .npmrc — adds legacy-peer-deps=true to restore npm 6-style peer dep resolution, allowing the optional version mismatch to be accepted without downgrading
  • package-lock.json — regenerated against the updated resolution strategy, keeping nodemailer@8.0.5 (patches SMTP command injection CVEs GHSA-c7w3-x93f-qmm8 and GHSA-vvjj-xcjg-gr5g present in all of v7.x)

Downgrading nodemailer to v7 was intentionally avoided — v7 has known SMTP injection vulnerabilities with no fix short of v8.0.5, and the app has no direct nodemailer usage.

Copilot AI linked an issue Apr 9, 2026 that may be closed by this pull request
Closed
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 9, 2026

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

Project Deployment Actions Updated (UTC)
main Ready Ready Preview, Comment Apr 11, 2026 10:07pm

Request Review

Agent-Logs-Url: https://github.com/DarkModder33/main/sessions/556b6e63-92e0-42ba-9745-6cdbfa1366e6

Co-authored-by: DarkModder33 <254196519+DarkModder33@users.noreply.github.com>
…nflict

Add .npmrc with legacy-peer-deps=true to allow npm to install nodemailer@^8.0.5
alongside next-auth@4.24.13 which requires nodemailer@^7.0.7 as an optional
peer dependency. This keeps the security-patched nodemailer v8 (which fixes
SMTP command injection vulnerabilities GHSA-c7w3-x93f-qmm8 and GHSA-vvjj-xcjg-gr5g)
instead of downgrading to the vulnerable v7.

Agent-Logs-Url: https://github.com/DarkModder33/main/sessions/556b6e63-92e0-42ba-9745-6cdbfa1366e6

Co-authored-by: DarkModder33 <254196519+DarkModder33@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bug in application as described Fix CI: resolve nodemailer v8 / next-auth v4 peer dependency conflict Apr 9, 2026
Copilot AI requested a review from DarkModder33 April 9, 2026 21:55
@DarkModder33 DarkModder33 marked this pull request as ready for review April 11, 2026 22:06
Copilot AI review requested due to automatic review settings April 11, 2026 22:06
@DarkModder33 DarkModder33 merged commit c02d486 into main Apr 11, 2026
11 of 17 checks passed
@DarkModder33 DarkModder33 deleted the copilot/fix-bug-in-application branch April 11, 2026 22:06
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We encountered an error and are unable to review this PR. We have been notified and are working to fix it.

You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

🔗 Link Audit

Status: ✅ Passed
Mode: standard (changed-scope)
Scanned files: 351
Indexed routes: 58
Broken links: 0
Missing anchors: 0
Generated: 2026-04-11T22:07:03.845Z
Changed-scope fallback: Changed-files scan unavailable (No valid base ref found among: origin/main, main, origin/master, master); used full scan.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

Qodana for JVM

53 new problems were found

Inspection name Severity Problems
Hardcoded passwords 🔴 Failure 1
Malicious dependency 🔴 Failure 1
Redundant character escape 🔶 Warning 16
Single character alternation 🔶 Warning 2
Unnecessary non-capturing group 🔶 Warning 1
Duplicated code fragment ◽️ Notice 28
Regular expression can be simplified ◽️ Notice 4

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Resolves CI npm ci failures caused by an optional peer-dependency range mismatch between next-auth@4.24.13 (expects nodemailer@^7) and the repo’s pinned nodemailer@^8.0.5.

Changes:

  • Adds legacy-peer-deps=true to .npmrc to bypass peer-dependency resolution conflicts during installs.
  • Regenerates package-lock.json under the new install resolution behavior.
  • Updates the generated typed-routes import path in next-env.d.ts.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.

File Description
.npmrc Forces npm to use legacy peer dependency resolution to unblock npm ci.
package-lock.json Lockfile regenerated to reflect the new peer-deps resolution behavior while keeping nodemailer@8.0.5.
next-env.d.ts Adjusts the typed routes import path under .next/.

@@ -0,0 +1 @@
legacy-peer-deps=true
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

Committing legacy-peer-deps=true at the repo root disables peer-dependency resolution checks for all npm install/ci runs (including nested projects like ai-micro/). That can mask genuine peer incompatibilities and make installs less predictable. Consider scoping this to CI only (e.g., pass --legacy-peer-deps or set NPM_CONFIG_LEGACY_PEER_DEPS=true in the affected workflows), or eliminate the root cause by removing the unused nodemailer dependency (no code references found) so the optional next-auth peer is simply absent.

Suggested change
legacy-peer-deps=true

Copilot uses AI. Check for mistakes.
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.

gt

3 participants