admin管理员组

文章数量:1122832

I have created a Gutenberg block using the following command: npx @wordpress/create-block test-block --template @wordpress/create-block-tutorial-template

Reference: /

Then ran npm start from within wp-content/plugins/test-block directory. Everything ran successfully. The plugin is active. But cannot find it inside the inserter.

Plugin meta:

**
 * Plugin Name:       Test Block
 * Text Domain:       test-block
 * ...
 * @package           create-block
 */

This is my first Gutenberg block!

I have created a Gutenberg block using the following command: npx @wordpress/create-block test-block --template @wordpress/create-block-tutorial-template

Reference: https://developer.wordpress.org/block-editor/getting-started/quick-start-guide/

Then ran npm start from within wp-content/plugins/test-block directory. Everything ran successfully. The plugin is active. But cannot find it inside the inserter.

Plugin meta:

**
 * Plugin Name:       Test Block
 * Text Domain:       test-block
 * ...
 * @package           create-block
 */

This is my first Gutenberg block!

Share Improve this question asked Jun 12, 2024 at 12:36 Subrata SarkarSubrata Sarkar 2394 silver badges16 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Gutenberg recently upgraded JSX Runtime which is only compatible WP >= 6.6. See link https://make.wordpress.org/core/2024/06/06/jsx-in-wordpress-6-6/

If you update WordPress to 6.6-beta2 then it should work.

In the meantime they are figuring out about back compatibility. See comment - https://make.wordpress.org/core/2024/06/06/jsx-in-wordpress-6-6/#comment-46779

Or if you are not ready to upgrade to WP 6.6 yet, you can downgrade @wordpress/scripts to 27 version. This back compat havoc came in version 28.

本文标签: Building my first ever Gutenberg block