I created a custom node following the instructions in the official documentation
Describe the problem/error/question
In the tutorial, restarting the n8n service is used to make n8n load custom node changes
But I hope to quickly see the effect of each modification
Instead of restarting the n8n service, each time n8n is restarted, it takes about 15 seconds to wait
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
n8n doesn’t support hot-reloading for custom nodes. If you update a custom node, you must restart the n8n process so it can re-read and recompile the node files.
That said, if you’re loading custom nodes from an external folder (for example, by mounting it in Docker), you can update the files without rebuilding the entire n8n package—just restart the service to apply your changes.
But there’s no way of applying your changes without restaring the service.
If my reply answers your question, please remember to mark it as a solution.
Thank you for your answer,
Can n8n custom nodes extract code into one file
Decoupling specific business logic code from n8n code
This method enables unit testing of business logic
Can you elaborate? I don’t understand the question
The directory structure of my custom node is as follows
▾ GitlabX1
GitlabX.func.ts
GitlabX.node.json
GitlabX.node.ts
gitlabx.png
I want to extract the core business code from GitlabX.node.ts
into GitlabX.func.ts
So I can directly perform unit testing on GitlabX.func.ts
If I could test the file separately
I don’t have to repeatedly reload n8n after each modification
I hope someone can help me.
I would be very grateful