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
After installing NextJS 13.4, a TypeError is being thrown with the message "Cannot read properties of undefined (reading 'serverActions')" when running the code. This bug was introduced in the PR #16819, which aimed to add support for NextJS 13.4.
The issue appears to be caused by the experimental configuration missing the 'serverActions' property. This error can be found in line 165 of the with-nx.ts file (
Error wouldn't happen if the serverActions is provided
Expected Behavior
A potential solution to this issue is to validate if the 'serverActions' property has been provided in the _nextConfig.experimental object. For example:
For anyone else reaching this page from search, temporary solution is to add experimental: {} to next.config.js:
/** * @type {import('@nrwl/next/plugins/with-nx').WithNxOptions} */constnextConfig={nx: {// Set this to true if you would like to use SVGR// See: https://github.com/gregberge/svgrsvgr: false,},experimental: {},// <-- add this};
Current Behavior
After installing NextJS 13.4, a TypeError is being thrown with the message "Cannot read properties of undefined (reading 'serverActions')" when running the code. This bug was introduced in the PR #16819, which aimed to add support for NextJS 13.4.
The issue appears to be caused by the experimental configuration missing the 'serverActions' property. This error can be found in
line 165
of thewith-nx.ts
file (nx/packages/next/plugins/with-nx.ts
Line 165 in 832fa71
Error wouldn't happen if the
serverActions
is providedExpected Behavior
A potential solution to this issue is to validate if the 'serverActions' property has been provided in the _nextConfig.experimental object. For example:
This fix should be implemented as soon as possible to ensure the proper functioning of the code.
GitHub Repo
https://github.com/ruslanguns/nx-issue-16845
Steps to Reproduce
Nx Report
Failure Logs
Operating System
Additional Information
This comment could be useful for reference when the bug has been introduced: #16819 (review)
The text was updated successfully, but these errors were encountered: