How to troubleshoot a custom Gutenberg block error: “This block has encountered an error and cannot be previewed”

Đã có trọn bộ đề thi thử THPT Quốc Gia 2022 các môn: vip.dethihsg247.com

I’m using a plugin from LinkedIn Learning to customize into my own plugin’s custom Gutenberg blocks.

After I’ve edited the file plugin/src/index.js (I edited the edit() & save() functions), I now have:

In Microsoft Visual Code, I am running the process wp-scripts start which recompiles the plugin after every save I believe. This process originally found some syntax errors for me, but I receive no more syntax errors in the output of wp-scripts start.

In a local dev WP site, when I try to add the new block, I receive an error:

This block has encountered an error and cannot be previewed

At the same time as adding the new block, in the Chrome console, I see:

which I’m having trouble understanding.

I’ve set:

but there is no output on screen or in a debug log.

I’ve searched online for the error, and most solutions involve updating WordPress or disabling plugins. I only have Akismet & MainWP child, plus the plugin to produce the custom blocks.

Disabling Akismet & MainWP child does not resolve the issue.

How would I go about troubleshooting this error?

Help appreciated.

Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
  • Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
  • Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
  • Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.

Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com