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

Please rename prop-types to something else (please read) #77

Closed
zentuit opened this issue Feb 1, 2018 · 1 comment
Closed

Please rename prop-types to something else (please read) #77

zentuit opened this issue Feb 1, 2018 · 1 comment

Comments

@zentuit
Copy link

zentuit commented Feb 1, 2018

I understand that this has come up before and it was dealt with in a PR. However there is still and issue. Webpack has a bug (that I'm trying to get tracked down) where the resolution graph gets messed up and results in prop-types trying to require itself.

Here's a gist of what I'm seeing: https://gist.github.com/zentuit/af24021fa3d95b340413587c4984432e

React's prop-types is moduleId 48 and styled-system's prop-types is moduleId 528. Instead of

var _propTypes = __webpack_require__(48);

I'm getting

var _propTypes = __webpack_require__(528);
@jxnblk
Copy link
Member

jxnblk commented Feb 3, 2018

This typically is due to web pack's resolve.modules being incorrectly used with a non-absolute path – see rebassjs/grid#51 (comment)

Regardless of what I rename the local module file in this library, the issue could come up with any npm package that shares the same name. Short of namespacing modules in this package, which should be unnecessary due to how modules work by default, there's not really a great way to avoid this sort of thing, and you should ensure that your application's module aliasing doesn't cause it to behave in non-standard ways.

Hope that helps and let me know if that doesn't resolve the issue.

@jxnblk jxnblk closed this as completed Feb 3, 2018
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

2 participants