U
U
uRoot2020-11-20 18:31:19
typescript
uRoot, 2020-11-20 18:31:19

Why does the React project created via npx create-react-app my-app --template typescript not start?

Created a project: npx create-react-app my-app --template typescript
On startup: yarn start
I see:

yarn run v1.22.10
$ react-scripts start
/run/media/crynet/DATA/WEB/www/Other/React/my-app/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js:239
      appTsConfig.compilerOptions[option] = value;
                                          ^

TypeError: Cannot assign to read only property 'jsx' of object '#<Object>'
    at verifyTypeScriptSetup (/run/media/crynet/DATA/WEB/www/Other/React/my-app/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js:239:43)
    at Object.<anonymous> (/run/media/crynet/DATA/WEB/www/Other/React/my-app/node_modules/react-scripts/scripts/start.js:31:1)
    at Module._compile (node:internal/modules/cjs/loader:1083:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
    at node:internal/main/run_main_module:17:47
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The project is empty. File: index.tsx :
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);


What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
uRoot, 2020-11-20
@uroot

Answer here:
https://github.com/facebook/create-react-app/issue...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question