sequelize db:migrate fails on localhost without internet connection
See original GitHub issueOn my win10 laptop, in airplane mode:
> sequelize db:migrate
Sequelize [Node: 6.9.2, CLI: 2.7.0, ORM: 3.30.4]
Loaded configuration file "config\config.json".
Unable to connect to database: SequelizeConnectionError: getaddrinfo ENOENT localhost:5432
Works fine as soon as the WiFi reconnects.
My config.json:
{
"username": "postgres",
"password": "password",
"database": "whatever",
"host": "localhost",
"dialect": "postgres"
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
node.js - sequelize migration not work properly - Stack Overflow
config.json file is Database connection file in sequelize. In my project config.json file have group of database. config.json look like:
Read more >Migrations - Sequelize
With migrations you can transfer your existing database into another state and vice versa: Those state transitions are saved in migration files, ...
Read more >Dockerizing a Node.js Web Application - Semaphore Tutorial
Create a new file for database migration at bin/migrate.js : ... to http://localhost:3000/persons/all you'll see a connection error message.
Read more >Usage - db-migrate - Read the Docs
To use db-migrate, you call it via the command line. When entering only the command without paramaters you will see something like this:...
Read more >Node, Postgres, and Sequelize - Michael Herman
November 1st, 2015 - Added Database Migrations ... Install Sequelize, pg (for making the database connection), and pg-hstore (for ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If I replace “localhost” in the config file with “127.0.0.1”, the problem does not occur.
I also had this issue, and it was fixed by replacing to
127.0.0.1