Skip to content

v3.39.0 breaks build with nested blocks #12719

Closed
@lunacd

Description

@lunacd

Describe the Bug

When using nested blocks, v3.39.0+ fails build with

Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of undefined (reading 'columns')

v3.38 and before have no issues.

Important bits in the reproduction:

If:

  1. the block is not nested (see https://github.com/lunacd/romantic-austin/blob/de1122eaaaee4a623b801095ddd106bfa30bd48c/collections/Collection.ts#L11-L12), OR
  2. the block is not used (delete https://github.com/lunacd/romantic-austin/blob/de1122eaaaee4a623b801095ddd106bfa30bd48c/app/(app)/page.tsx#L8-L10), OR
  3. payload v3.38 is used instead

This issue does not happen.

Link to the code that reproduces this issue

https://github.com/lunacd/romantic-austin

https://codesandbox.io/p/github/lunacd/romantic-austin/main

Reproduction Steps

Run pnpm i && pnpm run build.

Which area(s) are affected? (Select all that apply)

Not sure

Environment Info

Binaries:
  Node: 20.12.0
  npm: 10.5.0
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  payload: 3.40.0
  next: 15.2.0
  @payloadcms/graphql: 3.40.0
  @payloadcms/next/utilities: 3.40.0
  @payloadcms/richtext-lexical: 3.40.0
  @payloadcms/translations: 3.40.0
  @payloadcms/ui/shared: 3.40.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions