Nodejs Sequelize Eager Loading Error

Ok, I’m not entirely sure about the problem, but I believe it’s related to how the models are being included. As stated on the sequelize docs:

Which means you cannot include a required association after it’s defined.

A better approach may be to define everything in one place and later create the associations. Take a look at this example using express.

As shown in the example, you can create your models separately and later add the associations, passing a reference to the sequelize object.