Response
{
"errorType": "ReferenceError",
"errorMessage": "require is not defined in ES module scope, you can use import instead",
"trace": [
"ReferenceError: require is not defined in ES module scope, you can use import instead",
" at file:///var/task/index.mjs:4:25",
" at ModuleJob.run (node:internal/modules/esm/module_job:194:25)"
]
}
I have tried Node.js 18x - 12x and nothing works.
Response { "errorType": "ReferenceError", "errorMessage": "require is not defined in ES module scope, you can use import instead", "trace": [ "ReferenceError: require is not defined in ES module scope, you can use import instead", " at file:///var/task/index.mjs:4:25", " at ModuleJob.run (node:internal/modules/esm/module_job:194:25)" ] }