Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodejs 20 runtime introduces new behavior that causes lambda to fail #39

Closed
out-of-mana opened this issue Feb 20, 2024 · 1 comment
Closed

Comments

@out-of-mana
Copy link

Just ran into this today using an unpinned version of the module, when I would attempt to run the lambda I would get an error message like """[SyntaxError: Cannot use import statement outside a module]"""

I noted that the Nodejs runtime was 18.x on my working lambda and it was set to 20.x on the new lambda that got setup.

I googled a bit and found the solution was to add a package.json to the lambda with the following contents:

{
    "type": "module"
}

That seemed to get things working. I'll look at module source code and see if I can come up with a patch..

@mlcooper
Copy link
Collaborator

I was able to reproduce. Looking into it

mlcooper added a commit that referenced this issue Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants