Skip to content
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

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

Closed
gaearon opened this issue Sep 2, 2016 · 6 comments
Closed

Comments

@gaearon
Copy link
Contributor

gaearon commented Sep 2, 2016

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.

@gaearon
Copy link
Contributor Author

gaearon commented Sep 2, 2016

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

@gaearon
Copy link
Contributor Author

gaearon commented Sep 2, 2016

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

@Jiansen
Copy link
Contributor

Jiansen commented Sep 3, 2016

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.

@gaearon
Copy link
Contributor Author

gaearon commented Sep 3, 2016

Thanks!

@gaearon gaearon added this to the 1.0.0 milestone Sep 3, 2016
@Timer Timer modified the milestones: 0.10.0, 1.0.0 Mar 14, 2017
@Timer
Copy link
Contributor

Timer commented Mar 14, 2017

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

@gaearon
Copy link
Contributor Author

gaearon commented May 15, 2017

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

@gaearon gaearon closed this as completed May 15, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants