CRA dev dependency warning with yarn workspaces with react-scripts@2.0.0
See original GitHub issueIs this a bug report?
YES
Did you try recovering your dependencies?
YES yarn 1.5.1
Which terms did you search for in User Guide?
Environment
node -v
: 8.9.3npm -v
:yarn --version
(if you use Yarn): 1.5.1npm ls react-scripts
(if you haven’t ejected): 2.0.0-next.b2fd8db8
Then, specify:
- Operating system: macOS
- Browser and version (if relevant): Chrome
Steps to Reproduce
(Write your steps here:) Create app1 (express) with devdependencies: “devDependencies”: { “babel-jest”: “22.4.3”, “eslint”: “4.19.1”, “jest”: “22.4.3” }, Create app2 (CRA)
Expected Behavior
yarn start succeeds
Actual Behavior
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
“jest”: “22.1.2”
Don’t try to install it manually: your package manager does it automatically. However, a different version of jest was detected higher up in the tree:
root/node_modules/jest (version: 22.4.3)
Reproducible Demo
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:9 (1 by maintainers)
Top Results From Across the Web
CRA and Yarn Workspace - Medium
Typescript; Create React App to set up a web app; Yarn workspace. ... devDependencies : I move all development dependencies to the root ......
Read more >yarn workspaces shared package does not load in create ...
I tried to add dependency "@app/shared": "1.2102.0" into packages/frontend/package.json , but it was not helpful. Yarn does not spit any error ...
Read more >Building Scalable Front-end With Lerna, YARN And React In ...
Lerna already provides it so why go with YARN workspaces? ... This helps in faster delivery of new modules since developers don't get...
Read more >react-scripts-yarn-workspace - npm package - Snyk
All security vulnerabilities belong to production dependencies of direct and indirect packages. License: MIT. Security Policy: Yes ...
Read more >Sharing components using a monorepo built with Lerna and ...
It sets up 2 CRA projects and one shared project for code sharing. ... Install lerna as a dev dependency. yarn add lerna...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
there were a bunch of configuration issues when I tried to configure various projects. So at the end of the day I feel this warning is justified.
I ended up hoisting the packages suggested in the warning: jest specifically to get around this problem babel because of incompatibility issues for babel-loader with babel 7 and jest eslint for plugin errors I didn’t find any issues with webpack so far. — In root/package.json —
@Timer Can you expand on why this issue is closed? I’m still seeing it. We have a monorepo holding multiple CRA v1 apps and would prefer to not have to upgrade them all at once, but we’re seeing issues with a CRA v2 app exiting after warning about babel-jest being “detected higher up in the tree”.