"Cannot find name" and other problems with TypeScript-SFC
See original GitHub issueInfo
- Platform: Win 10
- Vetur version: 0.22.1
- VS Code version: 1.37.0
Problem
Vetur underlines everything and gives errors like Cannot find name
all the time.
Reproducible Case
At the moment I’m not sure how to make a reproducible case. The project is closed source and I’m not the author of most of the code. I mostly hope, that someone has seen this behaviour before.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:19
- Comments:39 (8 by maintainers)
Top Results From Across the Web
Typescript - "Cannot find name" errors in React components
I am migrating my existing React code over to TypeScript and I am hitting a lot of issues, one of them being a...
Read more >TypeScript errors and how to fix them
Common Errors. Below you find a list of common TypeScript errors along with the buggy code and its fixed version.
Read more >semantic error TS2304: Cannot find name 'react' (TypeScript ...
tsx(4,11): semantic error TS2304: Cannot find name 'react'. I am using yarn workspaces .
Read more >Using TypeScript - React Native
Getting Started with TypeScript ... If you're starting a new project, there are a few different ways to get started. ... If the...
Read more >Function Components - React TypeScript Cheatsheets
Declaring type of props - see "Typing Component Props" for more examples ... return type so an error is raised if you accidentally...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just encountered this issue as well, same situation as @msamsel
Steps taken to address:
@ktsn I hope this description will help you track down the error.
Same issue here. The way how I was able to make such error. VSCode: version: 1.47.1 Vetur: 0.24.0 MacOS: 10.15.5
anything.Vue
important part is to start extension with a capital letter.</template>
tag:anything.vue
test.Vue
nottest.vue
as it is an actual name of the file. It looks like something somewhere is cached.