Describe the issue/error/question
I just started with custom nodes. I cloned the n8n-nodes-starter and deleted everything but the ExampleNode. Then I read the docs about full versioning and tried to build a V1 version of my ExampleNode using the linked example Mattermost Node.
I fixed all the lint warning, ran npm run build
and copied the content of ./dist/
into my local n8n folder ~/.n8n/custom
.
Here is a link to my repository with the dist folder included: https://github.com/cauterize/n8n-custom-node-poc
At first glance everything seemed fine. I can find my ExampleNode in the Sidebar. But if I try to drag in in my Workflow I get the following error:
What is the error message (if any)?
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'version')
at index.3234c9ef.js:110:55958
at Array.forEach (<anonymous>)
at s.loadNodesProperties (index.3234c9ef.js:110:55922)
at s.addNodes (index.3234c9ef.js:110:51611)
at s.injectNode (index.3234c9ef.js:110:33839)
at async s.addNode (index.3234c9ef.js:110:34938)
Here are the corresponding code lines, where the error is thrown:
async loadNodesProperties(t) {
const e = this.nodeTypesStore.allNodeTypes,
s = [];
e.forEach((o) => {
const n = Array.isArray(o.version) ? o.version : [o.version];
!!t.find((i) => i.name === o.name && n.includes(i.version)) &&
!o.hasOwnProperty('properties') &&
s.push({
name: o.name,
version: Array.isArray(o.version) ? o.version.slice(-1)[0] : o.version,
});
}),
Please share the workflow
It’s not possible to create a workflow. The error is now thrown on any node I try to drag to the dashboard
Share the output returned by the last node
–
Information on your n8n setup
- n8n version: 0.211.1
- Database you’re using (default: SQLite): SQLite
- Running n8n with the execution process [own(default), main]: own
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm