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

prop-types: declare as a peer dependency #265

Merged
merged 1 commit into from Mar 3, 2019
Merged

prop-types: declare as a peer dependency #265

merged 1 commit into from Mar 3, 2019

Conversation

avindra
Copy link
Contributor

@avindra avindra commented Mar 1, 2019

create-react-app when building with yarn, react 16

 $ react-scripts start
 Starting the development server...

 Failed to compile.

 /usr/local/share/.cache/yarn/v4/npm-connected-react-router-5.0.1-8379854fad7e027b1e27652c00ad534f8ad244b3/node_modules/connected-react-router/lib/ConnectedRouter.js
 Module not found: Package "connected-react-router@5.0.1" (via "/usr/local/share/.cache/yarn/v4/npm-connected-react-router-5.0.1-8379854fad7e027b1e27652c00ad534f8ad244b3/node_modules/connected-react-router/lib/ConnectedRouter.js") is trying to require the package "prop-types" (via "prop-types") without it being listed in its dependencies (history, react, react-redux, react-router, redux, immutable, seamless-immutable, connected-react-router)

create-react-app when building with yarn:

```
 $ react-scripts start
 Starting the development server...

 Failed to compile.

 /usr/local/share/.cache/yarn/v4/npm-connected-react-router-5.0.1-8379854fad7e027b1e27652c00ad534f8ad244b3/node_modules/connected-react-router/lib/ConnectedRouter.js
 Module not found: Package "connected-react-router@5.0.1" (via "/usr/local/share/.cache/yarn/v4/npm-connected-react-router-5.0.1-8379854fad7e027b1e27652c00ad534f8ad244b3/node_modules/connected-react-router/lib/ConnectedRouter.js") is trying to require the package "prop-types" (via "prop-types") without it being listed in its dependencies (history, react, react-redux, react-router, redux, immutable, seamless-immutable, connected-react-router)
``
@avindra
Copy link
Contributor Author

avindra commented Mar 1, 2019

This code path:

https://github.com/supasate/connected-react-router/blob/master/src/ConnectedRouter.js#L85-L99

could be excluded in release builds as an alternative fix, at the risk of breaking older projects.

@supasate
Copy link
Owner

supasate commented Mar 3, 2019

LGTM. Thanks for your contribution! I prefer adding it to maintain backward compatibility.

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.

None yet

2 participants