Context:
I just ported one app from create-react-app-typescript to create-react-app. In a identically structured but different app, I did the same steps.
Steps:
npm uninstall react-scripts-ts
npm install react-scripts
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
Problems unique to second app:
- Type error: Cannot compile namespaces when the '--isolatedModules' flag is provided. TS1208
- Generated file
src/react-app-env.d.ts
Assumption:
The generated file src/react-app-env.d.ts causes the --isolatedModules error.
Actual Question:
How do I prevent react-scripts from generating the src/react-app-env.d.ts file upon react-scripts start?