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

Can packages have different versions of React? #8329

Open
simkessy opened this issue Sep 1, 2020 · 0 comments
Open

Can packages have different versions of React? #8329

simkessy opened this issue Sep 1, 2020 · 0 comments

Comments

@simkessy
Copy link

simkessy commented Sep 1, 2020

Bug description

What is the current behavior?

I have a common library which has React 16.13.1
I have an app in my workspace using React 16.8.1

When I run tests, Jest tries to use React 16.8.1 which is not compatible with the common library. When I look at the common/node_modules, it contains React 16.13.1 but instead Jest is moving up the tree to the root and using the older version of React.

Do all my packages need to match or can I force Common library to use react version in it's node_modules folder?

Command

yarn install && BUILD=client jest --coverage ./src

What is the expected behavior?

Common library and jest should be using the react version declared in it's package.json (16.13.1)
App library should be using React (16.8.1)

Environment

  • Node Version: 14.1.0
  • Yarn v1 Version: 1.22.4
  • OS and version: Lastest Mac Version
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

1 participant