Skip to content

Conversation

bruno12mota
Copy link

When using react already in a project, modules should have react in peerDependencies so that it doesn’t get included twice and uses the already included instance. Also updated React version, don’t know if you want that anyway decided to send a PR ;)

@saebekassebil
Copy link
Owner

Cheers bruno.

I've actually no experience publishing modules for react, but I'll get this (and #1) fixed ASAP.
I'm building a project on react 0.12, so I wouldn't want that dep bump, and I see no reason for not supporting both if possible?

@bruno12mota
Copy link
Author

Hey,

Strange, tried changing the peerDependency to 0.12.2 but it gives me an error when installing on my project:

"The package react does not satisfy its siblings' peerDependencies requirements!"

It should match since I've put ^0.12.2 so it should match 0.13 http://stackoverflow.com/questions/22343224/difference-between-tilde-and-caret-in-package-json

Gonna try some things out

Cheers

@bruno12mota
Copy link
Author

I think this is it, added peerDependency "react": ">= 0.12", and it now works in my project, can you confirm on yours as well?

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 this pull request may close these issues.

2 participants