Create-react-app: Issues with lerna and Yarn workplaces

Created on 19 Jul 2019  路  1Comment  路  Source: facebook/create-react-app

Describe the bug

We have a lerna monorepo setup with CRA project, Typescript Node.js Server and Javascript projects for shared codes. React script has jest dependacy with 24.7.1 and I installed jest as a devDependancy for one of shared package. It installed jest 28.x.x version and CRA preflight check fails.

Did you try recovering your dependencies?

I tried deleting node_modules, yarn.lock folder and running lerna bootsrap

Which terms did you search for in User Guide?

Environment

System:
    OS: macOS 10.14.5
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 75.0.3770.142
    Firefox: 67.0.4
    Safari: 12.1.1
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

  1. Setup lerna mono repo.
  2. Create CRA project as a package.
  3. Create a normal javascript package with jest as devDependancy.
  4. Try to start the CRA.

Expected behavior

CRA start without failure

Actual behavior

Pre flight check fails with jest version mismatch.

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

https://github.com/iamchathu/lerna-monorepo-test

bug

Most helpful comment

Any updates on it? Having the same trouble

>All comments

Any updates on it? Having the same trouble

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Evan-GK picture Evan-GK  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

AlexeyRyashencev picture AlexeyRyashencev  路  3Comments

onelson picture onelson  路  3Comments

rdamian3 picture rdamian3  路  3Comments