You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Documentation issue
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.The text was updated successfully, but these errors were encountered: