Cannot find name ts(2304)
See original GitHub issueHello brliant developer and thanks for youe dedicated work on Volar plugin!
Now I use Volar version 0.33.10 and there is a bug:
Cannot find name '...' .ts(2304)
errors are displayed on all variables returned in the setup function.
I have viewed issues about ts(2304)
and try to add in *.d.ts,but it seems make no effect.
declare module "@vue/runtime-dom" {
import type { DefineComponent } from "vue";
const component: DefineComponent<{}, {}, any>;
export default component;
}
It confused me for a long time. I try to install old verisons, but it still occured. And I noticed a situation is that when I create this program, it’ok. After I change formatter tool to “Prettier”, this problrm seems to occur. I tried to switch back, there is no effect. “@vue/runtime-dom”: “3.2.31”, “vue”: “3.2.31”. Thanks for your work!😁
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
TypeScript getting error TS2304: cannot find name ' require'
I am getting the error "TS2304: Cannot find name 'require' " when I attempt to transpile a simple TypeScript Node. js page.
Read more >TS2304: Cannot find name 'Request' · Issue #661 - GitHub
When compiling a Typescript file that uses MeiliSearch for Node.js, the error TS2304: Cannot find name 'Request' causes the build to fail.
Read more >TypeScript error TS2304 cannot find name require - Edureka
The error that I'm getting is the "TS2304: Cannot find name 'require' " when I attempt to transpile a simple TypeScript Node.js page....
Read more >Fix the Cannot Find Name 'require' Error in TypeScript
To fix the “cannot find name 'require'” error in TypeScript, install the @types/node package into your project by running npm i -D @types/node...
Read more >Typescript getting error TS2304 cannot find name ' require'
When we try to get a TypeScript running, we get this error: "TS2304: Cannot find name 'require' " when we attempt to transpile...
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 Free
Top 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
@Kylyi, @benkroeger these should be different issues, and it should be fixed in 0.34.4.
@johnsoncodehk I just fixed the problem by updating vscode. It seemed to be a mismatch between the version of volar and vscode.