After setting up a new project using create-react-app and yarn 2 in my vs code environment, I encountered an issue where the editor throws errors for every installed library. The error message I receive is:
Cannot find module 'react' or its corresponding type declarations.
Despite the project compiling and running successfully, these errors persist. Interestingly, changing the file extensions from .ts and .tsx to .js and .jsx makes the errors disappear. How can I resolve this problem specifically for typescript files?