Every time I try to execute the following command:
npx create-react-app my-app --template typescript
only a JavaScript project is created, without any .tsx
files.
- After consulting the CRA's TypeScript guide, it appears that the command requires Node.js version
or higher.<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="83f1e6e2e0f7afe1f1e0fbf2e6e1d2b0acb3acb3">[email protected]</a>
- However, the version specified in the
package.json
file ofmy-app
is only0.9.5
. - The globally installed version is actually
, which is the most recent one available.<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cdbfd8dcced997c9d9c8d3cadcdbe4908e908e909081fa959b95">[email protected]</a>
My current environment specifications are as follows:
- Node 16.13.2 (installed using this reference)
- npm 8.4.1
- npx 5.0.0
- Xubuntu 21.10