Create-react-app with typescript not working

I want to create a typescript react app using this Microsoft / TypeScript-React-Starter tool . I followed the instructions on the github page:

1. npm install -g create-react-app

2. create-react-app my-app --scripts-version=react-scripts-ts

3. cd my-app

4. npm start

      

Then I get this error:

error TS2304: Cannot find name 'process'

      

I uninstalled the create-react-app and reinstalled it. The error persists. By the way, yesterday I created a test program with the same tool and it worked. When I run this test program, it works as expected.

But any application I create today with the tool throws the above exception. I think my installation is corrupted in some way.

Any help would be greatly appreciated.

+3


source to share


1 answer


Reverting to typescript version 2.3.4 worked for me.

I used:



npm install typescript@2.3.4

+1


source







All Articles