-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Add deprecation for global installs #7422
Comments
Could you please clarify what console commands should raise errors? |
@miraage, something like:
We'd either include the updated commend(s), or provide a link. |
Hey @mrmckeb, I would like to contribute with this good first issue. Can you guide me on how to start with this? |
Hi @sagarnasit, of course. Let's ignore the exact messaging now and get a basic PR up, and then we can tune it. First, we need to detect if the package was installed globally:
The files we'll be doing this in are:
So, whenever either of those scripts is run and Let me know if that helps (or doesn't) :) |
Is your proposal related to a problem?
When rolling out new features that require changes to the
create-react-app
package, we regularly see issues related to users with older, global installs of that package.Describe the solution you'd like
Ideally, we should add a deprecation warning in
react-scripts
so that when it a user attempts to install it with a globally installedcreate-react-app
, they're asked to remove it and usenpx
oryarn create
instead.Describe alternatives you've considered
Alternatively, or additionally, we could add this to
create-react-app
itself, but that won't fix the issue for those with older installs.Additional context
This came out of a discussion with @iansu.
The text was updated successfully, but these errors were encountered: