Code node hanging in n8n cloud

Describe the problem/error/question

I am using the n8n Cloud plan and have encountered the following issue across multiple workflows:

  • All nodes in the workflow execute smoothly, with the entire workflow completing in under one second.

  • However, when I add a Code Node (JavaScript), the Code Node stays spinning indefinetily. This occurs regardless of the complexity of the code or the amount of data being processed. Even minimal code (a few lines) and a small number of items trigger the same behavior. It never shows any error since it keeps spinning.

There are a few topics in the community addressing the same issue which were solved disabling the TaskRunners. I can’t do it. Would you please help me?


  • **n8n version: 1.108.2

  • **Database (default: SQLite): default

  • **Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud

  • **Operating system: macOS Big Sur 11.4

Welcome to the community @Helbert_Leonel_Nunez

Your Code Node is stuck because n8n Cloud has a technical issue with how it runs JavaScript code.

Try this quick fix, remove any lines in your code that use require() to load external modules. Use only plain JavaScript. If that doesn’t work, you’ll need to contact n8n support directly, as this is a known problem they need to fix on their end.

Hope this helps!

1 Like

hey @Helbert_Leonel_Nunez welcome to n8n community.

when you execute workflow and code node keeps running.
could you confirm that workflow is appearing in executions?

Hi @moosa . Yes, it appears “running” indefinetily, though.

can you share your workflow?

https://tinholeonp.app.n8n.cloud/workflow/RRKHMwJ0IWNZzVGG

The link is the only way I’ve found able to share

Does anyone have any suggestion or help? Support doesn’t help me neither

here is how you can share workflow.

I’d already tried to share it that way to no avail. Maybe it allows to share the part of the code node

I’ve tried to bypass these code nodes with Edit fields nodes, but the output is not the same as the expected with the code node

I do really need the Code node to work efficiently. As I’ve seen in other questions, the problem may be the TaskRunners; since I can’t disable them from my n8n cloud, I need someone from support to help me with that.

what are your exit conditions and your body response looks like, i can take a look if you want

I just executed your given code node and it executed in no time!


may be you could share http node with data pinned(if it is not a problem for you) I could help better.

(post deleted by author)

just ran it and got no issue!

may be try updating n8n to newest version.

1 Like

Sorry for the interruption,
As my friend Moosa mentioned, the code itself works without issues, not sure if it’s related to the cloud version..

That said, I’d like to suggest another possible solution, completely removing the code node,

Perhaps you could try this approach: