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

strange behavior when multiple v2 versions are in the same bundle #60

Open
quantizor opened this issue Sep 6, 2018 · 3 comments
Open

Comments

@quantizor
Copy link

quantizor commented Sep 6, 2018

See styled-components/styled-components#1972

We use the library in styled-components like this https://github.com/styled-components/styled-components/blob/9d72abe32754ae9dd0bf9edf8a652ea592bdd06a/src/models/StyledComponent.js#L351-L362

Not really sure what to make of this 😕

@quantizor quantizor changed the title strange behavior when v2 and v3 are both in the same bundle strange behavior when multiple v2 versions are in the same bundle Sep 7, 2018
@quantizor
Copy link
Author

After more digging, the issue manifested with both 2.5.0 and 2.5.5 in the same bundle. This was due to next.js pinning their version to 2.5.0.

It's not clear to me why there were strange behaviors though, the library should be side effect free?

@mridgway
Copy link
Owner

mridgway commented Sep 7, 2018

Interesting. I'm looking through the version history to see if there were any bugs in 2.5.x that may have been fixed by 2.5.5. As far as I see, I think those versions only involved TypeScript definition changes.

@danieldelcore
Copy link

I think I'm having the same issue:

ModuleNotFoundError: /node_modules/formik/dist/formik.cjs.development.js
Module not found: Error: Can't resolve 'hoist-non-react-statics' in '/formik/dist'

ModuleNotFoundError: /node_modules/react-intl/lib/index.js
Module not found: Error: Can't resolve 'hoist-non-react-statics' in '/react-intl/lib'

It seems that both react-intl and formik depend on the same version and for some reason that results in the library not being installed on my machine 🤔

Formik: "hoist-non-react-statics": "^2.5.5",
React-Intl: "hoist-non-react-statics": "^2.5.5",

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