VsCode: Cannot find name react
Does anyone know how to fix this annoying warning, this is not happening at all on intellij.
5 Replies
i figured out, vscode cannot differentiate between index.ts and index.tsx, i had both of them and their intellisense or whatever got them mixed.
you can just restart ts server, it works for me
its kind of random, when you edit the file it displays this error yeah
Nah it didn't work, i asked in their repo and the response i got is this is intentional and i need to configure my ts file.
https://github.com/microsoft/TypeScript/issues/58844#issuecomment-2166344485
GitHub
Cannot find name react. · Issue #58844 · microsoft/TypeScript
I'm getting an annoying error saying it "Cannot find name react." However, im not using React at all, i'm using SolidJS. Everything is working smoothly on Intellij IDEA.
but since this is not important i just renamed to internal.tsx, since i won't distribute this file is just for internal visualization of the components i'll be building
oh okay i see