ES module Error Sequelize on Deploy using migration
i ve tested on vscode and works perfect!
my script start: "start": "sleep 3 && npx sequelize db:migrate && node ./dist/server.js"
example migration, using es module:
export default {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('states', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.DataTypes.INTEGER
},
name: {
allowNull: false,
type: Sequelize.DataTypes.STRING
},
created_at: {
allowNull: false,
type: Sequelize.DataTypes.DATE
},
updated_at: {
allowNull: false,
type: Sequelize.DataTypes.DATE
}
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable('states');
}
};
im tring to migrate and have this issue:
4 Replies
Project ID:
N/A
i think it is any settings on deploy
what node version do you use locally?
what node version is railway using? (look in the build table at the top of the build logs)