Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nextjs): Custom server should run on fresh apps without errors #17806

Merged

Conversation

ndcunningham
Copy link
Contributor

@ndcunningham ndcunningham commented Jun 26, 2023

Before when we ran custom server it would result in a error for fresh NextJs Apps

 throw new Error(`Could not find ${fileToRun}. Make sure your build succeeded.`);

This was because the server code was generated ./server/main.ts while the @nx/js:node executor expects it from the root of the project.

This change should address this issue.

@vercel
Copy link

vercel bot commented Jun 26, 2023

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

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2023 3:41pm

@ndcunningham ndcunningham self-assigned this Jun 26, 2023
@ndcunningham ndcunningham added the scope: nextjs Issues related to NextJS support for Nx label Jun 26, 2023
@nx-cloud
Copy link

nx-cloud bot commented Jun 26, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 6ec4b62. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@puku0x
Copy link
Contributor

puku0x commented Jul 2, 2023

This fixes #17270 . Thank you!

@github-actions
Copy link

github-actions bot commented Jul 8, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: nextjs Issues related to NextJS support for Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants