-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
CRA2 breaks lerna project #5305
Comments
@sebastienva it seems this is a change in node_modules resolution for latest jest. However, the new behaviour IMO is more standards compliant. In version The fix for this issue can be simple as noted in this PR on your reproducion |
Hi @osdevisnot, Thanks for you comment, I add If I add "react' as a dev-dependency I will loose the benefits of peer-dependency and in addition I will get the same error later in production mode. Edit : This will probably works if I publish the lib but why the behaviour should be different ? |
After some digging I have found the pr related to this issue : #3884
|
Is this a bug report?
I hope. It works with react-script 1.x.
Did you try recovering your dependencies?
I tried on a new app
Which terms did you search for in User Guide?
Lerna, monorepo
Environment
OS: macOS High Sierra 10.13.4
Node: 8.10.0
Yarn: 1.10.1
npm: 5.6.0
Steps to Reproduce
Expected Behavior
Component from lib 'B' is loaded.
Actual Behavior
Cannot find module 'react' from 'index.js'
Reproducible Demo
https://github.com/sebastienva/cra-lerna
This project includes 2 cra apps (test-current : react-script 1, test-next: react-script 2).
Just run yarn install && yarn test.
The text was updated successfully, but these errors were encountered: