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

node module react dependency? #8

Closed
dpwrussell opened this issue Oct 22, 2015 · 1 comment · Fixed by #9
Closed

node module react dependency? #8

dpwrussell opened this issue Oct 22, 2015 · 1 comment · Fixed by #9

Comments

@dpwrussell
Copy link

Hi,

I am not experience with node packaging, but I ran into an issue which I think must be to do with the React dependency of simple-react-modal. Initially I thought it was to do with dependencies vs dev/peer-dependencies, but I'm pretty sure it is a simple version mismatch problem. Potentially bump?

I tried this with a new React project. npm will install React 0.14.0 by default.

<Modal show={this.state.show} onClose={this.close}>
  <div>hey, click outside of me to close me!</div>
</Modal>

and in the browser, the response on loading the app:

Warning: Modal(...): React component classes must extend React.Component.

Then when trying to show the dialog:

Uncaught Error: Invariant Violation: Modal.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.

That all goes away if I nuke the React dependancy in simple-react-modal/node_modules

Cheers,

Douglas

@nmn
Copy link

nmn commented Oct 22, 2015

yeah, the dependency should be moved to be a peerDependency.

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

Successfully merging a pull request may close this issue.

2 participants