Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Fix Vercel deployment by copying Next.js build output to project root

This PR addresses the Vercel deployment issue that was causing the following error:

Error: <Html> should not be imported outside of pages/_document.
Read more: https://nextjs.org/docs/messages/no-document-import-in-page

Changes Made

  • Added a copyDirRecursively function to recursively copy directories
  • Modified the build command to copy the Next.js build output (.next directory) from the mdxe package to the user's project root after the build process completes
  • Added proper error handling for the build and copy process

Testing

These changes have been verified with:

  • Linting (pnpm lint)
  • Type checking (pnpm check-types)

The implementation ensures that after a successful Next.js build, the build output is copied from the mdxe package's directory to the user's project root, which should fix the deployment issues on Vercel.

Link to Devin run

https://app.devin.ai/sessions/312c0ac709db451ba4c680e4820fb468

Requested by: Nathan Clevenger (nateclev@gmail.com)

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link

vercel bot commented May 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mdx.org.ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 11:07pm
minimal ❌ Failed (Inspect) May 19, 2025 11:07pm

… directories

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
… router generation

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
…nent error

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

1 similar comment
@devin-ai-integration
Copy link
Contributor Author

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
…s router artifacts

Co-Authored-By: Nathan Clevenger <nateclev@gmail.com>
@nathanclevenger nathanclevenger merged commit 8026b61 into main May 19, 2025
2 of 5 checks passed
@nathanclevenger nathanclevenger deleted the devin/1747660413-fix-vercel-build-output branch May 19, 2025 23:10
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