I have connect postgres chat memory node to AI agent, and I receive an error code like
**Cannot read properties of undefined (reading ‘map’)
Anyone know how to solve this issue?**
I have connect postgres chat memory node to AI agent, and I receive an error code like
**Cannot read properties of undefined (reading ‘map’)
Anyone know how to solve this issue?**
Hi @Abhiru_Wijesinghe
If you’re using something like LangChain / n8n / a similar framework, the memory object may not be properly initialized.
Check that the Postgres table exists and has the right schema (usually needs a session_id, messages, created_at, etc.).
Make sure you initialize the chat memory with a valid sessionId and confirm the connection string is correct.
Thank you @chanchall
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.