Hello,
I am trying to build an agent that is integrated into the website. I got errors why testing the agent
ReferenceError: module is not defined
at …/website/headless/node_modules/decamelize/index.js:2:1
And LLMs thinks it is because the default dependency of langchain is decamelize@1.2.0, which does not support ESM. I tried unbundle and download external decamelize@6.0.0, it gives
POST 500 render /api/chatbot.data 9ms
Agent error: Error: [Error] Trying to import non-prebundled module (only prebundled modules are allowed):
file:///xxxx/website/headless/node_modules/ @langchain/openai/dist/index.js
Based on the Readme file, langchain & langgraph should support ESM and browser, right?
Any insights are appreciated!
Yang