Cannot run custom node locally from nodes folder

Describe the problem/error/question

I installed my custom node locally in my instance of n8n running locally. There was no ~/.n8n/nodes directory when I started but I created it (but there was an ~/.n8n) directory. I followed the instructions for using npm link and have the package linked in the ~/.n8n/nodes directory (which created a node_modules directory after the link.

But no matter what I try the custom node does not show up. I am just using the generic n8n starter and haven’t made any changes to it yet, just trying to create the dev workflow.

I have searched for the node by the node name not the package name (Example)

Any help would be greatly appreciated. I’ve been hacking at this for a while now and haven’t made any progress at all.

What is the error message (if any)?

No error message, just my node does show up.

Information on your n8n setup

  • n8n version:: 1.01
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): pnpm run dev
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Locally from git clone
  • Operating system: Mac OSX Ventura 13.4.1

Hey @zenweasel,

I did the same process last week for a node I was working on and it seemed to work ok for me, After you ran npm link n8n-nodes-your-package in the nodes directory did you then restart n8n?

Yes. It worked when I added the package to the custom directory rather than the nodes directory. So something seems to be broken with the underlying implementation

Hey @zenweasel,

That is odd, I was using the nodes directory so for me it was working ok. I wonder if there was an error with the node or something, If you clear our the nodes directory and try again does it start working?

I’ve tried just about every combination. It doesn’t create a nodes directory and when I created it, it does not seem to use it. I have installed, uninstalled n8n every which way and finally am running it locally from a clone. Any of those ways the behavior is the same, no nodes directory is created and if I create one it is ignored. The home directory it is using is ~/$HOME/.n8n

The validation that my node works fine is that it shows up in the Nodes options and I can use it in workflows when installed into custom.

Right now it’s working for me when using custom and this is only for local development of custom nodes so I have what I need for now.

1 Like

Hey @zenweasel,

That is somewhat worrying but as you have something that works I will do some more digging internally to see if I can find something.

Let me know if I can help in any way