Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

777
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!