Hello everyone,
I’m trying to create a clone of the LmChatOpenAi.node.ts
node. The goal is to be able to use the Anyscale service, which utilizes the same endpoints as OpenAI but for open-source models. I started with a custom-node project and did all the configuration to connect my project to my global n8n.
The build works fine, however, when I run n8n start
, I get this error:
Error loading node "LmChatAnyscale" from: "/Users/xaviercliquennois/.n8n/custom/node_modules/n8n-custom-nodes/dist/nodes/llms/LMChatAnyscale/LmChatAnyscale.node.js" - require(...).LmChatAnyscale is not a constructor
evalmachine.<anonymous>:1
new (require('/Users/xaviercliquennois/.n8n/custom/node_modules/n8n-custom-nodes/dist/nodes/llms/LMChatAnyscale/LmChatAnyscale.node.js').LmChatAnyscale)()
^
TypeError: require(...).LmChatAnyscale is not a constructor
at evalmachine.<anonymous>:1:1
at Script.runInContext (node:vm:134:12)
I don’t see why my node LmChatAnyscale.node.ts
, which is a simple clone of LmChatOpenAi.node.ts
, doesn’t work.
To get the build to work, I had to add these dependencies:
- “@n8n/n8n-nodes-langchain”: “^0.18.0”,
- “n8n-core”: “1.32.0”,
- “n8n-workflow”: “1.32.0”,
Information on your n8n setup
- n8n version: 1.32.2
- node version: v18.19.1
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm v8.15.0
- Operating system: macOS 14.1.2
Thanks for the help.