External Libs Error - Code doesn't return an object [item 0]

itrying to usa UUID libe , i installed n8n queue mode with this dockerfile : “FROM n8nio/n8n:latest
USER root
RUN npm install -g uuid
USER node”

but when i try to run a simple code like that ( image)

i getting this error:

{
“errorMessage”: “Code doesn’t return an object [item 0]”,
“errorDescription”: “Please return an object representing the output item. (‘undefined’ was returned instead.)”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “Code”,
“nodeType”: “n8n-nodes-base.code”,
“nodeVersion”: 2,
“itemIndex”: 0,
“n8nVersion”: “1.66.0 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“Error: Code doesn’t return an object [item 0]”,
" at JavaScriptSandbox.validateRunCodeEachItem (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/Sandbox.js:30:19)“,
" at JavaScriptSandbox.runCodeEachItem (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/JavaScriptSandbox.js:84:21)”,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)“,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/Code.node.js:150:26)”,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:722:19)“,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:707:51”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1137:20"
]
}
}

Someone know whats can i do to run this external lib correctly ?

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:

Solution : After some minutes i releas that i forget to insert “return” in the final of the code.

1 Like

Glad to hear you worked it out :raised_hands:

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