Debugging a custom node

Hello, guys!

I am developing a custom node and testing it on a local n8n on Docker. After writing the code in the node repository, I compile it, then take the /dist folder and replace the previous similar folder in the /custom folder with it. Then I restart Docker, and only then can I test my node.

Is there an easier way to debug a node? For example, so that when I change the code in the node repository, I can immediately see the changes in the n8n environment?

I would recommend simply running locally via pnpm in watch mode.

If you 100% need to use docker, then you will need to deal with restarting dockeron each change. This is not very pleasant or fast for development.

git clone https://github.com/n8n-io/n8n.git cd n8n pnpm install

Create your node in the main repo mkdir packages/nodes-base/nodes/YourNode

pnpm dev

Hope it helps, feel free to mark as Solution if it does.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.