create-react-app: Don't crash if users mistakingly install babel, webpack, jest, loaders, etc, at the top level

I’ve seen this issue multiple times. For some reason people don’t believe react-scripts is enough and try to install Babel, Webpack, and friends themselves. This can break things.

We need to mitigate this somehow.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 28 (16 by maintainers)

Most upvoted comments

I think we keep talking past each other. Sorry if I’m being confusing.

I don’t propose to forbid using your own version. (Early wording says that but my more recent comments don’t.)

What I’m saying is we should make sure that installing arbitrary Jest/Babel/Whatever version at top level does not break any of built-in react-scripts functionality. So you should be able to use them side by side if you know what you’re doing. In fact that’s how I’d expect it to already work—I have no idea why it breaks (according to reports).

Does this clarify things? That’s the only problem I’m referring to in this issue.

Optimally, we want people not to eject. I feel like there’s way too many small things people eject for that’s accomplishable without ejecting (e.g. using sass-loader).

I did some debugging. The Jest issue is caused by how Jest packages communicate: https://github.com/facebook/jest/issues/5294.