Error custom node after n8n update

Hello,

I just updated my n8n version, but it looks like my custom node does not work anymore.
I migrated from 0.126.1 > latest.
I get following error :


Is there something new to add in the custom nodes to make them work ?

I just tried to create a new blank custom node but I don’t see it appearing in N8n neither. I build it without any errors but I don’t see it when I search in on the right panel

Hi @babbel1005, there were some breaking changes since version 0.126.1 and the current 0.145.0 including one of which has an impact on custom nodes.

The error does however sound like the node might not be included in your currently running instance of n8n (see for example The node is not valid as its type "n8n-nodes-base.googleCloudNaturalLanguage" is unknown). Could you double-check whether your node has been added as described under Creating Your First Node | Docs?

Hi @MutedJam , thanks for your answer. For the version, I just checked and I used the same workflow to upgrade my version than the one in the link below
image
It looks like ok for me.
For your second question, I don’t quite get it. I don’t know if it is the “new” way but at that time I was using the package “n8n-node-dev” to create and build the custom nodes. Once built it copied the nodes in the .n8n directory…Is using “lerna” the new & correct way to create custom nodes ? And is there any way to update the “legacy” nodes ? Sorry for all the questions, but I’m quiet lost :slight_smile:

Ah, n8n-node-dev build is actually how I deployed my first own node as well :smiley:

The documentation is still available at Using the Node Dev CLI | Docs though, so my first thought would be that it should still work - I will give this a more thorough testing on Monday to make sure. Maybe @RicardoE105 has some thoughts on this in the meantime?

Until then is there any chance your node isn’t available in the .n8n/custom folder (maybe because you are deploying the new version through other means such as docker or have changed the N8N_USER_FOLDER environment variable)?

in the breaking changes for the version 0.135.0 are instructions on how to update the custom node.

Not sure what might be happening here. Will try to replicate the issue and report back.

1 Like

Thanks Ricardo, but I just checked the breaking-change document, but I don’t use this.getCredentials(myNodeCredentials) function in my node.
Here is the complete example :

  1. I create a new custom node (I leave everything by default)

  2. I build the node then (No visible errors)
    image

  3. I find my custom node in the specific folder :
    image

  4. But I can’t see it in n8n after restart

Can you check the /packages/nodes-base/package.json file to see if the nodes are registered there?

Where exactly should I search for these folders ? In the n8n installation folder Appdata/roaming/npm/node_modules/n8n ?

That depends on how you are running n8n, Are you going from NPM, Source or Docker?

I’m using NPM

In the “packages/node-base/package.json” they are not registered. So I have to copy/paste my nodes manually in the folder and update the package.json file. I can finally see my custom nodes ! A bit tricky but at least it works now. Thank you for your help !

1 Like