0

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
1
  • using default postgres account btw :) Commented Jan 21, 2021 at 5:59

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.