Issue #2477💬 AnsweredOpened December 28, 2019by bumpradar1 reactions

Broken Import when trying to use GEditor

快速解答by pouyamiralayi1

@bumpradar this issue must be posted here: grapesjs-react cheers!

Read full answer below ↓

Question

代码片段TEXT
×
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)

pouyamiralayiDecember 28, 2019

@bumpradar this issue must be posted here: grapesjs-react cheers!

Ace0611March 9, 2020

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.