Impostor icon indicating copy to clipboard operation
Impostor copied to clipboard

Error when running postgres database on Heroku

Open furfetched opened this issue 4 years ago • 1 comments

When running node dist/index.js (using the Heroku CLI), I get this error: (node:12) UnhandledPromiseRejectionWarning: DriverException: permission denied for database "postgres" at PostgreSqlExceptionConverter.convertException (/app/bot/node_modules/@mikro-orm/core/platforms/ExceptionConverter.js:8:16) at PostgreSqlExceptionConverter.convertException (/app/bot/node_modules/@mikro-orm/postgresql/PostgreSqlExceptionConverter.js:40:22) at PostgreSqlDriver.convertException (/app/bot/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js:160:54) at /app/bot/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js:164:24 at processTicksAndRejections (internal/process/task_queues.js:97:5) at async PostgreSqlDriver.find (/app/bot/node_modules/@mikro-orm/knex/AbstractSqlDriver.js:42:24) at async SqlEntityManager.find (/app/bot/node_modules/@mikro-orm/core/EntityManager.js:75:25) at async Object.cleanUpOldSessions (/app/bot/dist/actions.js:80:22) at async /app/bot/dist/index.js:26:5 The database url in .env is correct though.

furfetched avatar Oct 16 '20 09:10 furfetched

Did you set the DATABASE_URL password to your PostgreSQL password? That should be your problem. You can change the password by running psql and typing \password then follow the instructions.

DarrenAlex avatar Oct 18 '20 09:10 DarrenAlex