Skip to content

Issues with lerna and Yarn workplaces #7389

Open
@iamchathu

Description

@iamchathu

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions