VS code typescript intellisense not working

Hello, I've used Convex a number of times in previous projects and I've been pretty happy about the DX with VS Code. Now I'm starting a brand new NextJS project, and for some reason, VS Code's TypeScript IntelliSense is not working properly. I'm posting this here because I suppose it's a tsconfig issue. As you can see in the attached pictures, sometimes it's not suggesting otherTable and other times it's giving nonsense. I haven't modified the tsconfig that comes with the default Convex installation, but here it is anyways: { /* This TypeScript project config describes the environment that * Convex functions run in and is used to typecheck them. * You can modify it, but some settings required to use Convex. */ "compilerOptions": { /* These settings are not required by Convex and can be modified. */ "allowJs": true, "strict": true, /* These compiler options are required by Convex */ "target": "ESNext", "lib": ["ES2021", "dom"], "forceConsistentCasingInFileNames": true, "allowSyntheticDefaultImports": true, "module": "ESNext", "moduleResolution": "Node", "isolatedModules": true, "skipLibCheck": true, "noEmit": true }, "include": ["./**/*"], "exclude": ["./_generated"] } There is another tsconfig for NextJS, but that's outside the Convex folder, so normally it should be ignored. Another thing is that I just moved back to Windows from Ubuntu. Normally that should not be relevant because I have the latest version of everything (Node, TS...), but I'll mention it because this happened right after I moved, and it never happened when I created projects in Ubuntu as far as I can remember. Additionally, I have the command convex dev running in my terminal while I'm facing this issue. Thanks for your help!
No description
No description
No description
2 Replies
ballingt
ballingt9mo ago
For this particular case it's hard to autocomplete: the v.id() function is not customized to your particular convex types, and if it was there's be a cyclic type inference issue because the place you're using it you're defining the schema, which is how it would be inferred. So I think this isn't a change, it's just that types based on the schema where you're defining the schema don't work. You have to muddle through without type support while you're defining the schema so you can have good autocompletion everywhere else.
yassine safraoui
yassine safraouiOP9mo ago
I get your point, you're right, I must have confused it with when writing queries, it's then where it's able to infer the existing tables as I just tested now. Thanks a lot!

Did you find this page helpful?