nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.69k stars 2.37k forks source link

Next 13.4.x incompatibility with withNx in 16.1.1 #16830

Closed roderik closed 1 year ago

roderik commented 1 year ago

Current Behavior

on build:

- error Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error

 >  NX   Cannot read properties of undefined (reading 'serverActions')

   Pass --verbose to see the stacktrace.

Caused by https://github.com/nrwl/nx/blob/842c41232d7c072383305c25e44c7d80b7bf725b/packages/next/plugins/with-nx.ts#L163-L166C6

Fixed by adding this to my next configs

  experimental: {
    serverActions: true,
  },

Expected Behavior

My apps to compile

GitHub Repo

No response

Steps to Reproduce

  1. see current behaviour

Nx Report

Node   : 18.16.0
   OS     : darwin arm64
   pnpm   : 8.4.0
   Hasher : Native

   nx                 : 16.1.1
   @nx/js             : 16.1.1
   @nx/jest           : 16.1.1
   @nx/linter         : 16.1.1
   @nx/workspace      : 16.1.1
   @nrwl/workspace    : 14.8.8
   @nx/cypress        : 16.1.1
   @nx/devkit         : 16.1.1
   @nrwl/devkit       : 14.8.8
   @nx/eslint-plugin  : 16.1.1
   @nx/nest           : 16.1.1
   @nx/next           : 16.1.1
   @nx/node           : 16.1.1
   @nx/react          : 16.1.1
   @nx/rollup         : 16.1.1
   @nrwl/tao          : 16.1.1
   @nx/web            : 16.1.1
   @nx/webpack        : 16.1.1
   nx-cloud           : 16.0.5
   typescript         : 5.0.4
   ---------------------------------------
   Community plugins:
   @nx-go/nx-go                     : 2.7.0
   @nx-plus/docusaurus              : 14.1.0
   @nx-tools/nx-container           : 4.0.3
   @trumbitta/nx-plugin-unused-deps : 1.12.1
   @webpro/nx-tsc                   : 0.0.1
   nest-commander-schematics        : 3.0.0
   ---------------------------------------
   The following packages should match the installed version of nx
     - @nrwl/workspace@14.8.8
     - @nrwl/devkit@14.8.8

   To fix this, run `nx migrate nx@16.1.1`

Failure Logs

- error Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error

 >  NX   Cannot read properties of undefined (reading 'serverActions')

   Pass --verbose to see the stacktrace.

Operating System

Additional Information

No response

roderik commented 1 year ago

Duplicate of #16845

github-actions[bot] commented 1 year ago

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.