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): fix custom server templates #17266

Merged
merged 1 commit into from
May 29, 2023

Conversation

puku0x
Copy link
Contributor

@puku0x puku0x commented May 27, 2023

Current Behavior

  • tsc says there is a type error in server/main.ts.
  • "tsBuildInfoFile": "../..//tmp/buildcache/apps/client/server",

Expected Behavior

  • No type error in server/main.ts.
  • "tsBuildInfoFile": "../../tmp/buildcache/apps/client/server",

Related Issue(s)

Fixes #

@puku0x puku0x requested a review from a team as a code owner May 27, 2023 12:55
@puku0x puku0x requested a review from mandarini May 27, 2023 12:55
@vercel
Copy link

vercel bot commented May 27, 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 May 27, 2023 3:29pm

@puku0x
Copy link
Contributor Author

puku0x commented May 27, 2023

I found another bug related to custom server.

// The output is in `dist/apps/<project-name>/server/main.js` 
// but @nx/js:node tries to find `dist/apps/<project-name>/main.js`
"build-custom-server": {
  "executor": "@nx/js:tsc",
  "defaultConfiguration": "production",
  "options": {
    "outputPath": "dist/apps/client",
    "outputFileName": "server/main.js",  // 👈 outputFileName is missing
    "main": "apps/client/server/main.ts",
    "tsConfig": "apps/client/tsconfig.server.json",
    "clean": false,
    "assets": []
  },

Copy link
Member

@mandarini mandarini left a comment

Choose a reason for hiding this comment

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

Thanks @puku0x

@mandarini mandarini merged commit 0d48d4d into nrwl:master May 29, 2023
@github-actions
Copy link

github-actions bot commented Jun 4, 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 Jun 4, 2023
@puku0x puku0x deleted the fix-next-custom-server-templates branch July 1, 2023 03:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants