N8n won't startup in a docker image error: Cannot read properties of undefined (reading 'database')

Hi, I’m getting errors trying to startup n8n in a Docker container running in AWS. Here is what I’m seeing in my logs:

plugin: n8n
task: findCommand (update:workflow)
module: @oclif/[email protected]
(node:7) Warning: TypeError
message: Cannot read properties of undefined (reading ‘database’)
root: /usr/local/lib/node_modules/n8n

I’m using a Postgres DB and seem to have the correct environment variables

$(DB_POSTGRESDB_DATABASE) *****
$(DB_POSTGRESDB_HOST) *****
$(DB_POSTGRESDB_PASSWORD) *****
$(DB_POSTGRESDB_PORT) 5432
$(DB_POSTGRESDB_USER) *****
$(DB_TYPE) *****

Any clues what may be causing this error?

Information on your n8n setup

  • n8n version:1.68.0
  • Database (default: SQLite):Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
  • Operating system:Linux

hello @Simon_Jones

Are you sure that the n8n container can access your DB?

It was indeed a problem with access to the database which didn’t already exist in my Postgres database. I ended up switching to SQLite and everything worked flawlessly. Thank you for your assistance @barn4k and sorry for the tardy reply.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.