Title: React Plugin Validation Failed
Last modified: March 4, 2024

---

# React Plugin Validation Failed

 *  [lachlhat](https://wordpress.org/support/users/lachlhat/)
 * (@lachlhat)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/react-plugin-validation-failed/)
 * Hi, running a local 6.4.3 version of wordpress through docker and trying to develop
   a custom block. I’ve stripped back the functionality to the barest of minimums
   to try and get something that will point me in the right direction.
 * The project itself is using a design library that exports tsx components. This
   may be a cause but unsure of how to remedy from the wp side of things.
 * The code for index.js is as follows
 *     ```wp-block-code
       import { registerBlockType } from "@wordpress/blocks";
       import metadata from "./block.json";
       import { Button } from "design-library";
       import { useBlockProps } from "@wordpress/block-editor";
   
       const edit = () => (
         <div {...useBlockProps()}>
           <p>Hello World - Block Editor</p>
           <Button
             onClick={() => {
               alert("asdf");
             }}
           >
             Hello World
           </Button>
         </div>
       );
       const save = ({ attributes }) => (
         <p {...useBlockProps.save()}>
           {attributes.message}
           <Button
             onClick={() => {
               alert("asdf");
             }}
           >
             Hello World
           </Button>
         </p>
       );
   
       registerBlockType(metadata.name, {
         edit,
         save,
       });
       ```
   
 * When it is added to the page in the editor, the edit version shows as expected,
   but it doesnt show on the front end, additionally when reloading the page editor
   it has the following error in the console:
 *     ```wp-block-code
        <span class="objectBox objectBox-string">).
   
       Content generated by save function:
   
       <p class="wp-block-ia-cst-my-custom-block">Hello World - Frontend <button target="" type="button" class="ant-btn ant-btn-default"><span>Hello World</span></button></p>
   
       Content retrieved from post body:
       </span></span></span></span>
       ```
   
 * and the following shows twice:
 *     ```wp-block-code
       TypeError: n is undefined
       ```
   
 * Other than that the block.json is as follows:
 *     ```wp-block-code
       {
         "$schema": "https://schemas.wp.org/trunk/block.json",
         "apiVersion": 3,
         "name": "block/my-custom-block",
         "title": "Hello World",
         "category": "widgets",
         "icon": "smiley",
         "textdomain": "helloworld",
         "editorScript": "file:./index.js",
         "editorStyle": "file:./index.css",
         "viewScript": "file:./view.js",
         "description": "Blah blah blah, this is a test",
         "attributes": {
           "message": {
             "type": "string",
             "source": "text",
             "selector": "div",
             "default": "Hello World"
           }
         }
       }
       ```
   
 * Any advise is greatly appreciated 🙂
    -  This topic was modified 2 years, 3 months ago by [lachlhat](https://wordpress.org/support/users/lachlhat/).

Viewing 1 replies (of 1 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/react-plugin-validation-failed/#post-17501452)
 * > React Plugin Validation Failed
 * `React Plugin`? Please tell us where did you acquire it from so wh can can guide
   you to that plugin’s support form.

Viewing 1 replies (of 1 total)

The topic ‘React Plugin Validation Failed’ is closed to new replies.

## Tags

 * [block](https://wordpress.org/support/topic-tag/block/)
 * [blocks](https://wordpress.org/support/topic-tag/blocks/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [gutenberg](https://wordpress.org/support/topic-tag/gutenberg/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/react-plugin-validation-failed/#post-17501452)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
