Skip to content

CRA2 breaks lerna project #5305

Description

@sebastienva

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

  1. Build a monorepo with lerna
  2. Init project 'A' with cra
  3. Create a lib 'B' (no cra) and a react component ("react" is a peer-dependancy)
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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