I fixed the problem by adding the following to tsconfig.json
“paths”: { “react”: [“./node_modules/@types/react”] },