Closed
Description
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
- Build a monorepo with lerna
- Init project 'A' with cra
- Create a lib 'B' (no cra) and a react component ("react" is a peer-dependancy)
- Include a component from lib 'B' which require 'react' to project 'B'
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.