Community nodes not installing after pod restart

I’m hosting n8n on my kubernetes cluster. I’m also using the GitHub - brave/n8n-nodes-brave-search: A n8n node for Brave Search community node in a workflow. After restart, the community node fails to install with the following log message:

Try to activate workflow "Teams Agent" (4C3KaiEegu0d379V)
Unrecognized node type: @brave/n8n-nodes-brave-search.braveSearch

The UI shows the following:

I then have to copy the node name and manually install it again. How can I ensure that the nodes are installed automatically on startup?

Information on your n8n setup

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

Fixed it by including N8N_REINSTALL_MISSING_PACKAGES=true in the environment variables.