Describe the issue/error/question
I need to transform query string into json,I’ve been trying to use URLSearchParams via url module (imported) but I’m getting the error below.
What is the error message (if any)?
TypeError: URLSearchParams is not a constructor
at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/FunctionItem:6:14
Please share the workflow
Share the output returned by the last node
TypeError: URLSearchParams is not a constructor
at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/FunctionItem:6:14
at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/FunctionItem:8:2
at BaseHandler.apply (/usr/local/lib/node_modules/n8n/node_modules/vm2/lib/bridge.js:479:11)
at NodeVM.run (/usr/local/lib/node_modules/n8n/node_modules/vm2/lib/nodevm.js:425:23)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/FunctionItem/FunctionItem.node.js:107:41)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:592:51)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:455:64
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Expected output: “foo”,
all params as json object is preferred (could be done once I have all keys to iterate on)
Information on your n8n setup
- n8n version:0.179.0-debian
- Database you’re using (default: SQLite):default
- Running n8n with the execution process [own(default), main]:
- Running n8n via [Docker, npm, n8n.cloud, desktop app]:docker