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

rc-collapse fires an "unexpected import" error with react 16.6.3 #123

Open
pretentiousgit opened this issue Jun 20, 2019 · 2 comments
Open

Comments

@pretentiousgit
Copy link

pretentiousgit commented Jun 20, 2019

Following along with the examples, using Collapse triggers this error in my build:

Invariant Violation: 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. Check the render method of `ComponentName`.

Replacing Collapse with nothing or a string clears up the error. Panel export is fine.

React 16.6.3
Create-React-App stack
Chrome browser

@afc163
Copy link
Member

afc163 commented Jun 20, 2019

Any reproduce?

@serjant
Copy link

serjant commented Jul 9, 2020

The same thing here, I found the workaround for the import:

import Collapse from 'rc-collapse/es/index';

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

3 participants