When first learning Typescript (properly learning, not create-react-app), I ran into this error while attempting to run .ts files in VS Code.
The solution is to actually build the .ts file into a .js file. To do this, run
tsc --watch
in your project directory.
Top comments (0)