1

I'm trying to add TypeScript to my existing create-react-app project as mentioned here.

When I rename a file to tsx and restart the server I get the following error in the App.js file where the tsx file is imported like import Team from './components/pages/Team' this.

Module not found: Can't resolve

I also noticed that tsconfig.json file was not auto-generated when I added typescript( as mentioned in the above link )

What am I doing wrong here?

0

1 Answer 1

1

If anyone is here and facing this issue, my problem was with a version of react-scripts

this feature is available with [email protected] and higher.

I was in 2.0.3 and updating to the latest fixed the issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.