Replies: 3 comments 1 reply
-
I passed for the same error. My solution was:
Before these steps, I changed all my files to .tsx or .ts. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That guide says that |
Beta Was this translation helpful? Give feedback.
0 replies
-
You need to run the following command to add tsconfig: npx tsc --init |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a CRA app. I want to start using typescript.
according to this guide for adding typescript to an existing Create React App project I installed the typescript and required type definitions:
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
and add a file named
test.tsx
contains:and import and use it in main.js
ctrl+c
previous development server.and did
npm start
.I'm getting bellow error.
also, there isn't any auto-created
tsconfig
file in the project folder.I pushed the change that I made in a new branch named typescript to my reposity
also, I repeat this process for a fresh CRA app, and the same error happened.
am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions