Setting up hot reloading

Hi,

Can someone provide some guidance in order to setting up the hot reloading ? I have an custom note and currently at every change I need to rum: npm rum build && n8n start which is not the ideal dev environment.

  • n8n version: 1.47.3
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Windows

Thanks for the help!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @Igor_Barcelos

Check this out

1 Like

Hi Barn, thank you for you response.
Could you explain to me how can I set the environment variables ? I’ve just started to use this technology.

I’m not running n8n inside an Docker, I’ve installed globally using npm and then I run n8n start. From here, how should I proceed ?

On Windows you can do it with Powershell or bare cmd:

  1. via powershell -$env:N8N_DEV_RELOAD = 'true'
  2. via CMD - set N8N_DEV_RELOAD=true

Depending on what you are using to run npm, you should run the corresponsive command before starting the n8n. Keep in mind that the env variable will live only during that session (while the terminal window is opened)

Hi Barn,

I’m doing as below :

  • I run : set N8N_DEV_RELOAD=true
  • I run n8n start
  • In my node project I run then : npm run dev

Still not able to set the hot building. What I’m doing wrong here ?
Thanks for you return.

Is the node project separated from the first two points? If so - then that won’t work. The environment will live only within the terminal window. That’s why you need to set the ENV and run the n8n from within the project

Hi,

Sorry but still not working.
In my node directory I run the commands as below, if I change something in my execute function I don’t get the expected results.

and then npm run dev

Hey @Igor_Barcelos,

The dev reload should only work when running n8n from source, If you are building your custom node outside of the n8n project it likely won’t work.

Personally when I am making community nodes I make it inside the n8n project then copy it out to publish it.

1 Like