Problem in node ‘Execute Command‘

Describe the problem/error/question

I am trying to make a workflow that downloads CSVs from a site and convert it into a SQLite Database but it errors out making it fail to run at Sync to Database.

What is the error message (if any)?

Problem in node ‘Sync to Database‘

Command failed: node /home/gwashark/Documents/CSVtoSQLITE/index.js “/home/gwashark/Documents/e621/Temp/pools.csv” “e621.db” “pools”

Please share your workflow

NOTE: ? is Execute Command

Share the output returned by the last node

{
  "errorMessage": "Command failed: node /home/gwashark/Documents/CSVtoSQLITE/index.js \"/home/gwashark/Documents/e621/Temp/pools.csv\" \"e621.db\" \"pools\"\n",
  "errorDetails": {},
  "n8nDetails": {
    "nodeName": "Sync to Database",
    "nodeType": "n8n-nodes-base.executeCommand",
    "nodeVersion": 1,
    "itemIndex": 0,
    "time": "2/4/2026, 1:38:37 PM",
    "n8nVersion": "2.6.3 (Self Hosted)",
    "binaryDataMode": "filesystem",
    "stackTrace": [
      "NodeOperationError: Command failed: node /home/gwashark/Documents/CSVtoSQLITE/index.js \"/home/gwashark/Documents/e621/Temp/pools.csv\" \"e621.db\" \"pools\"",
      "",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts:102:12)",
      "    at processTicksAndRejections (node:internal/process/task_queues:105:5)",
      "    at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1069:8)",
      "    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1250:11)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1685:27",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2328:11"
    ]
  }
}

Expected:

✓  Connected to the SQLite database.
✓  CSV headers: [ 'id', 'name', 'created_at', ... ]
✓  Table 'pools' created successfully.
✓  CSV file successfully processed.
✓  Database connection closed.
✅  Conversion complete! Check 'e621.db' for your database.

Information on your n8n setup

  • n8n version: 2.6.3
  • Database (default: SQLite): SQLITE
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main(?)
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Debian 12 Bookworm

Hi @gwashark have you tried changing your “Sync to Database” command to the correct path on the Docker container’s filesystem

something like:

node /usr/src/n8n/data/CSVtoSQLITE/index.js “/usr/src/n8n/data/e621/Temp/pools.csv” “/usr/src/n8n/data/e621.db” “pools”

1 Like

My paths are setup as

Host (Outside the Container) Container (Inside the Container)
/DATA/AppData/n8n /home/node/.n8n
/home/gwashark /home/gwashark

So I don’t think that would work.

now Understood your path now @gwashark, you can either install all the nodejs dependencies (sqlite3 etc.) which will be here according to your path

/home/gwashark/Documents/CSVtoSQLITE/index.js

and it needs to be inside your n8n docker container globally. OR modify the workflow and run the conversion through n8n’s inbuilt nodes and not an external script. This might be the reason causing the issue.

Thanks for your help, I tried Ai again and now we are on track.

2 Likes