Sequelize error: defineCall not defined in Index.js

This usually means you're trying to import a non-sequelize object. If the name of your index file is Index.js then you need to change it in your filter function (first letter is capital)

return (file.indexOf(".") !== 0) && (file !== "Index.js");

As it is case sensitive. Also check that there aren't any other files in your import folder which don't define sequelize model. If there are just add them to your filter function.


I saw a similar problem just now and the problem was a file that was in the models folder that was not actually a database model. Ensure that your models folder only contains models for your database. Hopefully this helps!