Open sylvaincordiere opened 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;
i still get the error even i changed PlainText from wp.blocks to wp.editor
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';
npm install Error and even error during Build
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.