Nodes location

Hi, Hope you all are doing great.
I have a question:

How n8n reads the nodes-base’s package.json file and recognizes/loads the nodes?
I mean which files/codes are doing this?

Why I’m asking? bcuz I want to see if it’s possible to create nodes outside nodes-base (just a thought)

n8n automatically checks on every startup if there are any npm packages installed that have n8n nodes defined and if so it loads them automatically. So all the logic you need is already in place to do what you want to do.
You can find the code for an example npm module for an external n8n node here.

You can find some information about that in the documentation here.


Thanks man you are awesome

You are welcome. Have fun!

1 Like