Impostor
Impostor copied to clipboard
Error when running postgres database on Heroku
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.
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.