Steven's answer did not work for me but switching the foreign keys.
Competence.belongsToMany(Module, {
through: Module_has_competence,
as: 'module',
foreignKey: 'competence_id'
});
Module.belongsToMany(Competence, {
through: Module_has_competence,
as: 'competence',
foreignKey: 'module_id'
});