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

Docs requested for withNx demoing config factory function setup #16141

Closed
2 of 4 tasks
lourd opened this issue Apr 6, 2023 · 2 comments · Fixed by #16315
Closed
2 of 4 tasks

Docs requested for withNx demoing config factory function setup #16141

lourd opened this issue Apr 6, 2023 · 2 comments · Fixed by #16315
Assignees
Labels
outdated scope: nextjs Issues related to NextJS support for Nx type: docs

Comments

@lourd
Copy link
Contributor

lourd commented Apr 6, 2023

Documentation issue

  • Reporting a typo
  • Reporting a documentation bug
  • Documentation improvement
  • Documentation feedback

My team and I are upgrading Nx and Next.js app from 13.8 and 12.10 to 15.9.2 and 13.1.1, respectively. One of the things that we ran into without any clear reason was an internal Next.js error along the lines of "the config must be an object, not a function".

This turned out to be because the implicit signature of the withNx config plugin from @nrwl/next changed in the last month, in this PR from @ndcunningham #15650. Digging into the source and history of this file I was able to find the PR and this issue comment where @jaysoo has a suggested fix (thank you!)

The fix took us a few hours to figure out. It would be really helpful if the docs and/or reference repo for @nrwl/next illustrated how to use withNx when your application needs to use the config factory function. An e2e test that covered this functionality would be excellent, too, but docs would probably be more helpful for devs looking for this issue. I think this is a pretty common project set up; I think the "No changes are required for existing workspaces" statement in the description of the PR that changed the behavior was a big miscalculation.

@jaysoo
Copy link
Member

jaysoo commented Apr 14, 2023

This is the new doc: https://nx-dev-git-fork-jaysoo-docs-nextjs-config-nrwl.vercel.app/packages/next/documents/next-config-setup

Waiting for reviews.

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

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

Successfully merging a pull request may close this issue.

3 participants