Closed
Description
Describe the bug
start a vanilla project using the typescript template
open any file. you'll see an error like this this:
but CRA overwrites the file every time it starts. Many bug reports on this ducking behavior
- tsconfig.json gets overwritten preventing real configuration #8614
- https://stackoverflow.com/questions/53794875/how-to-configure-react-script-so-that-it-doesnt-override-tsconfig-json-on-star
etc.
Did you try recovering your dependencies?
yes
Which terms did you search for in User Guide?
wtf does cra overwrite my tsconfig.json
Cannot use JSX unless the '--jsx' flag is provided.",
Environment
➜ tadmin git:(tadmin) ✗ npx create-react-app --info
npx: installed 67 in 4.641s
Environment Info:
current version of create-react-app: 4.0.1
running from /Users/dc/.npm/_npx/17244/lib/node_modules/create-react-app
System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
Binaries:
Node: 14.5.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.14.9 - /usr/local/bin/npm
Browsers:
Chrome: 86.0.4240.198
Edge: Not Found
Firefox: Not Found
Safari: 14.0.1
npmPackages:
react: ^17.0.1 => 17.0.1
react-dom: ^17.0.1 => 17.0.1
react-scripts: 4.0.1 => 4.0.1
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
1 $ npx create-react-app my-app --template typescript
2 open vscode editor.
Expected behavior
can use typescript with CRA
Actual behavior
Reproducible demo
try with your own template