You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2023-03-05T05:18:16.556Z undefined ERROR Uncaught Exception
{
"errorType": "ReferenceError",
"errorMessage": "require is not defined in ES module scope, you can use import instead",
"stack": [
"ReferenceError: require is not defined in ES module scope, you can use import instead",
" at file:///var/task/index.mjs:3:11",
" at ModuleJob.run (node:internal/modules/esm/module_job:194:25)"
]
}
I continue to get this error from the very beginning of the script and I've tried changing it to import and the code breaks even further. I'm sure that this is somehow related to my configurations but I have it set on node.js 18.x and I don't see a whole lot else I could change to get this to work. Please help.....
The text was updated successfully, but these errors were encountered:
Either I goofed, or changing index.js didn't work for me. However, making it index.cjs (CommonJS module extension) seems to have done the trick. No other syntax changes required, as yet. (Although I'm now debugging other things...)
2023-03-05T05:18:16.556Z undefined ERROR Uncaught Exception
{
"errorType": "ReferenceError",
"errorMessage": "require is not defined in ES module scope, you can use import instead",
"stack": [
"ReferenceError: require is not defined in ES module scope, you can use import instead",
" at file:///var/task/index.mjs:3:11",
" at ModuleJob.run (node:internal/modules/esm/module_job:194:25)"
]
}
I continue to get this error from the very beginning of the script and I've tried changing it to import and the code breaks even further. I'm sure that this is somehow related to my configurations but I have it set on node.js 18.x and I don't see a whole lot else I could change to get this to work. Please help.....
The text was updated successfully, but these errors were encountered: