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

Invariant Violation #86

Open
jmkoomen opened this issue Sep 16, 2019 · 2 comments
Open

Invariant Violation #86

jmkoomen opened this issue Sep 16, 2019 · 2 comments

Comments

@jmkoomen
Copy link

jmkoomen commented Sep 16, 2019

I included Linkify according to the documentation:

import Linkify from 'react-linkify';

render() { return ( ... <Linkify>{some.text}</Linkify> ... ); }

but when running my app I get:

invariant.js:44 Uncaught (in promise) 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. Check the render method of 'Linkify'. at invariant (http://localhost:3020/static/js/bundle.js:11421:16) at ReactCompositeComponentWrapper.instantiateReactComponent [as _instantiateReactComponent] (http://localhost:3020/static/js/bundle.js:25798:24) at ReactCompositeComponentWrapper.performInitialMount (http://localhost:3020/static/js/bundle.js:26223:23) at ReactCompositeComponentWrapper.mountComponent (http://localhost:3020/static/js/bundle.js:26114:22) at Object.mountComponent (http://localhost:3020/static/js/bundle.js:18495:36) at ReactDOMComponent.mountChildren (http://localhost:3020/static/js/bundle.js:25232:45) at ReactDOMComponent._createInitialChildren (http://localhost:3020/static/js/bundle.js:22237:33) at ReactDOMComponent.mountComponent (http://localhost:3020/static/js/bundle.js:22056:13) at Object.mountComponent (http://localhost:3020/static/js/bundle.js:18495:36) at ReactCompositeComponentWrapper.performInitialMount (http://localhost:3020/static/js/bundle.js:26227:35)

I also tried importing like
import {Linkify} from 'react-linkify';
as it seemed that sometimes this causes the invariant violation. But it did not fix the problem. What could I be doing wrong here? Any help is appreciated.

@jadus
Copy link

jadus commented Nov 8, 2019

Hi, did you find any solution to this ? I'm facing the same problem

@axelson
Copy link

axelson commented Jan 16, 2020

It looks like this is because the 1.0.0-alpha now requires react 16 and uses React.Fragment:

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