Code node not returning any output

I tried to search here and on Google but could not find any solution.
I can’t get the code node to work at all. Even with very simple code.

n8n version: 1.102.3, running in EC2 in AWS using Docker

Code being executed:

return [
  { json: { name: "test" } }
];

Mode: Run Once For All Items

I do not see any output.

I tried to add a console.log. No output in console either.
I tried several other formats:

return { result: [ { json: { test: "hello" } } ] };
return { test: "hello" };

I see this in the docker logs:

node execution output incorrect data
Error: node execution output incorrect data
    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1220:6)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27
    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2153:11

Could anyone help please? I am stuck.

Thanks.

Hi @Pierrick, hope all is well. Welcome to community!
Can you embed your workflow here? Just to make sure that your workflow is nothing wrong.

Hey @Pierrick hope all is well, welcome to the community.

There appears to be a product bug about this issue:

It was mentioned here. Feel free to contribute with your case.

Thanks @jabbson however I do not use OpenAI and my error is related to the fact that the code node does not return anything at all when I execute this step.

Also, it has been marked as “can be ignored”, which in my case won’t work.

Actually, you are probably right. I created a new workflow with just the code node and it’s working fine. Thanks!

You are very welcome, hope this gets solved.

It’s all working now. Thanks a lot for the help!

1 Like

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