bigbite / gutenberg-postlist-demo

The demo plugin from our post
48 stars 17 forks source link

I get react error #2

Open sylvaincordiere opened 6 years ago

sylvaincordiere commented 6 years ago

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 commented 6 years ago

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 commented 5 years ago

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

asha23 commented 5 years ago

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 commented 3 years ago

npm install Error and even error during Build