Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get react error #2

Open
sylvaincordiere opened this issue Jul 10, 2018 · 4 comments
Open

I get react error #2

sylvaincordiere opened this issue Jul 10, 2018 · 4 comments

Comments

@sylvaincordiere
Copy link

I get this error
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

@pharmarin
Copy link

The element PlainText is registered in wp.editor.
Try changing const { registerBlockType, PlainText } = wp.blocks; to const { registerBlockType } = wp.blocks; const { PlainText } = wp.editor;

@HeckCas
Copy link

HeckCas commented Jun 5, 2019

i still get the error even i changed PlainText from wp.blocks to wp.editor

@asha23
Copy link

asha23 commented Sep 16, 2019

I got around this by doing the following (ES Next)

import { __ } from '@wordpress/i18n';
import { registerBlockType } from '@wordpress/blocks';
import { PlainText } from '@wordpress/editor';
import { Component } from '@wordpress/element';

@shubshinde
Copy link

npm install Error and even error during Build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants