Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

769
Vistas
problem with sequelize db:migrate and postgres

i'm a beginner and i'm trying to deploy a back-end application. I'm using an aws EC2 with ubuntu server and the problem is as follows. in the application on my machine the command "yarn sequelize db: migrate" runs normally, executes the migrations and creates the tables. but not on the server. I already changed the environment variables, even put the information directly in the code, even so it does not run the migrations. the most it does is: deploy@ip-xxx.xxx.xxx.xxx: ~ / app / server $ yarn sequelize db: migrate yarn run v1.22.4 $ /home/deploy/app/server/node_modules/.bin/sequelize db: migrate

Sequelize CLI [Node: 14.4.0, CLI: 5.5.1, ORM: 5.21.6]

Loaded configuration file "src / config / database.js". Done in 0.54s.

It is as if I did not enter the migrations folder for any reason

i'm using postgres on docker image.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

TL;DR: try to use the latest version for all the dependencies for sequelize-cli, as shown in the last code block of this response.

I am not 100% sure if this is the same issue I encountered. But I have been stuck in a similar situation for 2 days. Basically when I run "npx sequelize db:migrate", it will show the following,

Sequelize CLI [Node: 14.4.0, CLI: 5.5.1, ORM: 5.21.6]

Loaded configuration file "src / config / database.js".
Using environment "development".

Then it just stopped there! I dived deep into the sequelize-cli library and put some console log statements in to see what's failing. Eventually I found that somehow it's failing in

return sequelize.authenticate().then(() => { 

this line in the /sequelize-cli/lib/core/migrator.js

Eventually, it got me wondering if this is an external dependency issue. Then I use the latest dependencies, as following in my package.json

"dependencies": {
    "pg": "^8.2.1",
    "sequelize": "^5.21.13",
    "sequelize-cli": "^5.5.1"
},

I realized that I was previously using "pg": "^7.18.2". Then this fixed the issue for me.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda