Sequelize intellisense doesn't work in Visual Studio Code
What are you doing?
I installed sequelize package inside Visual Studio Code and I imported it. Then I typed command new Sequelize and I opened brace and intellisense didn't appear. I also tried to define model and after typing model name and dot intellisense again didn't appear. How to fix this problem?
Environment
Dialect:
- [x] mysql
- [ ] postgres
- [ ] sqlite
- [ ] mssql
- [ ] any Dialect library version: mysql2 1.6.5 Database version: XXX Sequelize version: 5.8.9 Node Version: v11.12.0 OS: Windows 10 x64 If TypeScript related: TypeScript version: XXX Tested with latest release:
- [ ] No
- [ ] Yes, specify that version:
I have the same problem here.
same. vs code version - 1.35.1(latest)
I'm having the same problem - VS Code v1.35.1
Me too.

Same but now on Version: 1.36.1
This looks like a bug with VSCode to be honest... I just tried to reproduce, and the following happened:
-
I installed Sequelize on an empty local folder and tried to reproduce this problem, and reproduced it successfully
-
I navigated to
node_modules/sequelize/types/index.d.tsand opened it as a new tab in VSCode and then closed it -
I went back to my JS file and intellisense magically started working.
Can anyone check if this "solves" the problem as well? @kuskhan @raghavgrover21 @Platiplus @Flippittiflop @renecruzATX
@papb no its not working, tried it with my 2 projects just to be sure.
This looks like a bug with VSCode to be honest... I just tried to reproduce, and the following happened:
- I installed Sequelize on an empty local folder and tried to reproduce this problem, and reproduced it successfully
- I navigated to
node_modules/sequelize/types/index.d.tsand opened it as a new tab in VSCode and then closed it- I went back to my JS file and intellisense magically started working.
Can anyone check if this "solves" the problem as well? @kuskhan @raghavgrover21 @Platiplus @Flippittiflop @renecruzATX
That didn't solved the issue for me, the intellisense works on previous versions, but not in latest stable or 6.0.0.
What worked for me but it doesn't make sense is the following:

Using "const Sequelize = require('sequelize').Sequelize;" works.
But that only works in the connection file, when you try to import it for the modules, the autocomplete kind of works when you don't use this syntax. I'm really lost here hahaha
@raghavgrover21 @Platiplus thanks for the replies. I am lost too. After I did what I said above, it started working and I can't reproduce the problem anymore. It started working for me magically...
This looks like a bug with VSCode to be honest... I just tried to reproduce, and the following happened:
- I installed Sequelize on an empty local folder and tried to reproduce this problem, and reproduced it successfully
- I navigated to
node_modules/sequelize/types/index.d.tsand opened it as a new tab in VSCode and then closed it- I went back to my JS file and intellisense magically started working.
Can anyone check if this "solves" the problem as well? @kuskhan @raghavgrover21 @Platiplus @Flippittiflop @renecruzATX
That didn't solved the issue for me, the intellisense works on previous versions, but not in latest stable or 6.0.0.
What worked for me but it doesn't make sense is the following:
Using "const Sequelize = require('sequelize').Sequelize;" works.
But that only works in the connection file, when you try to import it for the modules, the autocomplete kind of works when you don't use this syntax. I'm really lost here hahaha
I tried this way and it worked. Thank you very much @Platiplus
Beautiful! Thanks @Platiplus! It worked like a charm. I have a database JS file that I created and that is where I deployed this trick. Anywhere I import that database file the Intellisense works fine. The hive mind works again!
It works if you import const Sequelize = require("sequelize").Sequelize in the main connection file where you make connection to your database.
const Sequelize = require("sequelize").Sequelize gets intellisense partly working, but (for me) intellisense is still not working within functions such as create.
Similar to #8616
On VSCode Version 1.36.1, it's also buggy but this one works
const Sequelize = require('sequelize').Sequelize;
Thanks, @Platiplus
Observe that const { Sequelize } = require('sequelize'); is more readable (IMO).
This should also work.
import { Sequelize } from 'sequelize';
I confirm the problem in vscode 1.37.1 under Windows 10
@sulian Does
const { Sequelize } = require('sequelize');
instead of
const Sequelize = require('sequelize');
fix it for you?
Thanks , it works if we use
const { Sequelize } = require('sequelize'); instead of
const Sequelize = require('sequelize');