WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.4k stars 4.16k forks source link

Scaffolded block doesn't register in editor due to @wordpress/scripts version 28.0.0 #62390

Closed wlcdesigns closed 3 months ago

wlcdesigns commented 3 months ago

Description

Currently, if I use npx @wordpress/create-block@latest to scaffold a new block in WP 6.5.4, it does not register. Meaning it does not show up int he editor at all via the inserter or "/". Downgrading @wordpress/scripts to version 27.. fixes the issue. The @wordpress/scripts changelog states that 28.0.0 is a breaking change for 6.5.

Step-by-step reproduction instructions

  1. Run npx @wordpress/create-block@latest my-block
  2. cd my-block
  3. npm run build
  4. Navigate to new page or new post
  5. Try to find "my-block"

Screenshots, screen recording, code snippet

No response

Environment info

WP 6.5.4

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Mamaduka commented 3 months ago

This is duplicate of #62202.