Unable to launch docker-compose up

This is a template you can use to report issues. You can also drag images, videos and include Preformatted text

Expected behavior

On launching the command docker-compose up, I expect the API to run.

Actual behavior

Docker compose triggers an error and exit with status 1

Failure Logs

Model creation error: Error: A column called ‘id’ was added to the attributes of ‘users’ but not marked with ‘primaryKey: true’
/usr/src/node_modules/sequelize/lib/associations/mixin.js:93
throw new Error(${source.name}.${_.lowerFirst(Type.name)} called with something that's not a subclass of Sequelize.Model);
^

Error: exchangeRates.belongsTo called with something that’s not a subclass of Sequelize.Model

Context

Please provide any relevant information about your setup.

  • Package Version:
  • Express Version: 4.17.1
  • Sequelize Version: 5.15.1
  • Database Dialect: postgresql
  • Database Version: 12
  • Project Name:

Can you share your /models/user.js file?
Seems like there is a problem there, according to the exception message

// This model was generated by Forest CLI. However, you remain in control of your models.
// Learn how here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/models/enrich-your-models
module.exports = (sequelize, DataTypes) => {
  const { Sequelize } = sequelize;
  // This section contains the fields of your model, mapped to your table's columns.
  // Learn more here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model
  const Users = sequelize.define('users', {
    firstName: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    lastName: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    email: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    organizationId: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    siteId: {
      type: DataTypes.INTEGER,
    },
    companyId: {
      type: DataTypes.INTEGER,
    },
    dateOfLogin: {
      type: DataTypes.DATE,
    },
    language: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    password: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    erpId: {
      type: DataTypes.STRING,
    },
    erpEmail: {
      type: DataTypes.STRING,
    },
    dateOfLastNotification: {
      type: DataTypes.DATE,
    },
    phoneNumber: {
      type: DataTypes.STRING,
    },
    isBlocked: {
      type: DataTypes.BOOLEAN,
    },
    dailyEmailSchedule: {
      type: DataTypes.DATE,
    },
    id: {
      type: DataTypes.INTEGER,
      field: 'id',
    },
  }, {
    tableName: 'users',
    timestamps: false,
  });

  // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v6/reference-guide/relationships#adding-relationships.
  Users.associate = (models) => {
    Users.hasMany(models.exchangeRates, {
      foreignKey: {
        name: 'updatedByIdKey',
        field: 'updatedById',
      },
      as: 'updatedByExchangeRates',
    });
    Users.hasOne(models.usersAdministration, {
      foreignKey: {
        name: 'userIdKey',
        field: 'userId',
      },
      as: 'usersAdministration',
    });
  };

  return Users;
};

Can you add the primaryKey: true parameter here?

Like this:

id: {
    type: DataTypes.INTEGER,
    field: 'id',
    primaryKey: true
}