Skip to content

Paths are incorrectly resolved when react-scripts is a shared dependency #556

Closed

Description

@gaearon

Not sure if we want to (or even can) support this use case, but this doesn't currently work:

- proj
  - package.json # contains react-scripts
  - node_modules
    - react-scripts
  - a
    - package.json # does not contain react-scripts but has npm start
    - src
  - b
    - package.json # does not contain react-scripts but has npm start
    - src

Technically this is valid in npm, but CRA thinks it’s running in local development mode.

Activity

  1. gaearon commented on Sep 2, 2016

    @gaearon
    ContributorAuthor

    @Jiansen Could you take a look at this? Curious if you have ideas.

  2. gaearon commented on Sep 2, 2016

    @gaearon
    ContributorAuthor

    The good part is this never worked before, so at least it’s not a regression.

  3. Jiansen commented on Sep 3, 2016

    @Jiansen
    Contributor

    I will take a look. @remove-on-publish-begin/end should remove local dev only code.

    Before we had @remove-on-publish/eject-begin/end, we use path compare to determine if CRA is running in local dev, as an npm module, or after eject. We should hopefully be able to remove those checks now.

  4. gaearon commented on Sep 3, 2016

    @gaearon
    ContributorAuthor

    Thanks!

  5. added this to the 1.0.0 milestone on Sep 3, 2016
  6. modified the milestones: , 1.0.0 on Mar 14, 2017
  7. Timer commented on Mar 14, 2017

    @Timer
    Contributor

    Retagging this for 0.10, but we might've already fixed this with our recent path changes.
    Please check before working on it. :)

  8. gaearon commented on May 15, 2017

    @gaearon
    ContributorAuthor

    I think the remaining issue will be fixed by #2166.

  9. locked and limited conversation to collaborators on Jan 21, 2019
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions