I am working on trying to deploy my code to an aws lambda function via a .zip file and I keep getting the following error when testing:
"errorType": "Error", "errorMessage": "require() of ES Module /var/task/index.js from /var/runtime/index.mjs not supported.\nInstead change the require of index.js in /var/runtime/index.mjs to a dynamic import() which is available in all CommonJS modules.", "trace": [ "Error [ERR_REQUIRE_ESM]: require() of ES Module /var/task/index.js from /var/runtime/index.mjs not supported."
In my package.json I have "type":"module" declared, and I am not using any 'require' imports in any of my files, so I am pretty confused on why this is happening.
If anyone could shed some light on this, that would be great!
Thank you in advance.