Skip to content

Dependency Warning - proper way to implement Yarn Workspace monorepo with CRA with root dependencies? #6324

@clayhan

Description

@clayhan

I am running into an issue when trying to start CRA when I have similar dependencies in the root of my yarn workspace monorepo. I have a .eslintrc in the root of my project along with all of my Eslint/Prettier packages so that all of my projects are able to receive linting/autoformatting.

I just recently added CRA to my monorepo in an attempt to create a new application. This gives me an error message and I did not want to assume that I would not run into any future issues. I am hoping to learn the ideal solution to how to properly use CRA within a yarn workspace monorepo while also being able to have proper linting/autofortmatting via Eslint and Prettier.

Demo repo below.

Is this a bug report?

Maybe
Very closely related to #4296. I was unable to decipher a proper solution from this discussion.

Steps to Reproduce

  1. Clone demo repo below
  2. Run yarn to install dependencies
  3. Run yarn workspace my-app start to try to start the application.

Expected Behavior

yarn start succeeds

Actual Behavior

Get error message:
capture

Reproducible Demo

https://github.com/clayhan/cra-yarn-test

Thanks for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions