Skip to content

fix(nextjs): downgrade nextjs due to known issue with bun commonjs module bundling#1073

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/nextjs
Aug 21, 2025
Merged

fix(nextjs): downgrade nextjs due to known issue with bun commonjs module bundling#1073
waleedlatif1 merged 1 commit into
stagingfrom
fix/nextjs

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

Type of Change

  • Bug fix

Testing

created a new branch and tested the build action to ensure it deploys to docker

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 21, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs Building Building Preview Comment Aug 21, 2025 8:23am
sim Building Building Preview Comment Aug 21, 2025 8:23am

@waleedlatif1 waleedlatif1 merged commit 4c9fdbe into staging Aug 21, 2025
2 of 4 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/nextjs branch August 21, 2025 08:23
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR implements a targeted fix for a compatibility issue between Next.js 15.5.0 and Bun's CommonJS module bundling system. The changes downgrade Next.js from version 15.5.0 to ^15.3.2 and adjust source map configuration to work around Bun issue #21137.

The fix involves two key modifications:

  1. Package downgrade: Next.js is reverted from 15.5.0 to ^15.3.2 in package.json, allowing patch updates within the stable 15.3.x series while avoiding the problematic version
  2. Source map configuration adjustment: The next.config.ts file removes the general productionBrowserSourceMaps: false setting and adds turbopackSourceMaps: false to the experimental section, indicating a shift to Turbopack-specific source map control

This approach maintains the project's Bun-centric architecture (evident from the oven/bun:alpine Docker base image and bun engine requirements) while ensuring build stability. The solution is temporary, designed to maintain functionality until the upstream Bun issue is resolved, at which point Next.js can be upgraded again.

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it addresses a specific, documented compatibility issue
  • Score reflects a well-researched fix targeting a known upstream bug with clear documentation and testing
  • No files require special attention as the changes are minimal and focused

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

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.

1 participant