mongodbvisual-studio-codemongooseautocomplete

mongoose auto completion not work in vscode


I cant get mongoose auto completion in my IDE,

I have tried restarting my IDE and work file and updating linux packages (including vscode) and restart my system but that didnt help.

you can see my problem in one picture: enter image description here

&

enter image description here

I have tried in another places like codesandbox :

https://codesandbox.io/p/sandbox/busy-chaplygin-qym7pp?file=/index.js:5,5

go to above link and just hit ctrl + space and then you wont see auto completion: enter image description here

since i started learning mongodb using mongoose i have this issue, whats the problem? how can i fix this?

my system and vscode info:

enter image description here

$lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy


Solution

  • Solved it by adding a new keyword before mongoose.Schema, like this:

    enter image description here

    Special thanks to https://t.me/deptyped