Skip to content

Misleading statement: "You almost never need to update create-react-app itself" #6140

Closed

Description

@carpben

Is this a bug report?

No, it's about the documentation.

Which terms did you search for in User Guide?

misleading documentation update


A few weeks I started a new project with the new version of create-react-app --typescript. In the process I intended to update create-react-app. I searched about it and arrived at this page (Create-React-App documenation), where I read:

You almost never need to update create-react-app itself: it delegates all the setup to react-scripts.

When you run create-react-app, it always creates the project with the latest version of react-scripts so you’ll get all the new features and improvements in newly created apps automatically.

I figured out updating CRA is not necessary.
As a result the new project of create-react-app was not created properly (see here). Files were not created with .tsx extension, typescript and type libraries were not installed etc.

I also had another related bug - running npx create-react-app --info produced an error.
Yesterday I updated Create-React-App itself and that solved the bugs. I had a relatively updated version of create react app as I reinstalled everything on this computer 4 months ago.

Can you please remove the statements above, or update them?

Activity

  1. tomvalorsa commented on Jan 7, 2019

    @tomvalorsa
    Contributor

    Just experienced the same problem.

    In my case, I had create-react-app@1.5.2 globally installed on my local machine. Even when using the suggested typescript setup command for a new project in the docs (using npx) I still wasn’t getting a tsconfig/.tsx files etc.

    I’ve since realised that npx was defaulting to my locally installed version of create-react-app, so deleting this was enough to get npx looking for the latest version.

    Not sure if this is too opinionated to be in the scope of the docs, but perhaps suggesting that users don’t install a global version of CRA locally would be useful?

  2. ianschmitz commented on Jan 7, 2019

    @ianschmitz
    Contributor

    Yes this had come up a few times recently. I think adding something to the docs to call this out would be helpful for users that have previously installed it globally.

  3. mrmckeb commented on Jan 8, 2019

    @mrmckeb
    Contributor

    Perhaps we should even recommend users remove global installs, and avoid those wherever possible.

  4. carpben commented on Jan 8, 2019

    @carpben
    ContributorAuthor

    I just visitied https://facebook.github.io/create-react-app/docs/getting-started. Installtion instructions have changed; I think in the past users were recommended to run something like `npm i -g create-react-app". So I guess this is the source of the problem.

  5. added a commit that references this issue on Jan 9, 2019
    bedd0b2
  6. ianschmitz commented on Jan 9, 2019

    @ianschmitz
    Contributor

    I've created #6157 to hopefully clear this up. It's come up a number of times recently after the addition of the --typescript option to the CLI. For users that have an older version installed globally, npx will use that cached version.

  7. added a commit that references this issue on Jan 9, 2019
    2741781
  8. added a commit that references this issue on Jan 13, 2019
  9. carpben commented on Jan 13, 2019

    @carpben
    ContributorAuthor

    @ianschmitz, thanks!
    #6157 is great, but I think updating-to-new-releases.md is still misleading, and should be updated. Someone who installed the global version of CRA is likely to visit the "updating to new releases" page.

  10. carpben commented on Jan 13, 2019

    @carpben
    ContributorAuthor

    I submitted a PR #6190 to update updating-to-new-releases.md.

  11. locked and limited conversation to collaborators on Jan 18, 2019
  12. added a commit that references this issue on Feb 24, 2019
    575f47a
  13. added a commit that references this issue on Mar 2, 2019
    04eedd2
  14. added a commit that references this issue on May 14, 2019
    4275a0e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions