No, it's about the documentation.
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鈥檒l 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?
Just experienced the same problem.
In my case, I had [email protected] 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鈥檛 getting a tsconfig/.tsx files etc.
I鈥檝e 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鈥檛 install a global version of CRA locally would be useful?
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.
Perhaps we should even recommend users remove global installs, and avoid those wherever possible.
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.
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.
@ianschmitz, thanks!
I submitted a PR https://github.com/facebook/create-react-app/pull/6190 to update updating-to-new-releases.md.
Most helpful comment
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.