Broken Import when trying to use GEditor
Question
×
Unhandled Rejection (Error): Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
`import React from 'react';
import { GEditor } from 'grapesjs-react'
export default () => {
return (
<GEditor />
);
} `Answers (2)
@bumpradar this issue must be posted here: grapesjs-react cheers!
Hi, I am getting this error while trying to import GEditor from grapesjs-react (import GEditor from 'grapesjs-react';): Error: 'grapesjs-react' does not contain a default export (imported as 'GEditor').
Has anyone resolved this issue?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3075
BUG: Unhandled Rejection (TypeError): i.classList is undefined
Hi. I updated GrapesJS to its current version 0.16.22 and I get an error on the callback function: editor.on("component:add", (model) => {...
Issue #1113
[QUESTIONS] New trait type is not working with rendered components?
Hello, thanks for the great framework. I'm trying to apply this to my project. I want to add a new trait for existing LINK '<a>' component....
Issue #3460
BUG: TypeError: Cannot read property 'get' of undefined
Error: (node:206) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined (node:206) UnhandledPromiseRejection...
Issue #2943
BUG: this.get('content') returns empty string when trying to add custom component type
Version: 0.16.18 Are you able to reproduce the bug from the demo?>> Demo <<< [ X ] Yes [ ] No What is the expected behavior? Expecting this...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.