Reputation: 355
I am using psql not pgadmin for interacting with sequelize, so while running sequelize db:migrate
error shows ERROR: Error reading "config/database.js". Error: TypeError: Cannot read property 'USER' of undefined
.
I think there is problem in my config file as i am just starting out,below is my config file :-
APP_KEY=
APP_URL=http://localhost:3001/
APP_PORT=3001
DB_HOST=localhost
DB_USER=postgres
DB_PASSWORD=hidden
DB_DATABASE=chat_app
Upvotes: 0
Views: 399
Reputation: 355
I have found the solution, it was in config/database.js DB_HOST was not correctly defined.Also,remember to check tables when you do seqeulize db:migrate.
Upvotes: 1