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
I'm not sure why this isn't working suddenly. The issue above mentions esbuild not supporting the punycode/ import. Maybe I added something that depends on this import recently, like jsdom?
punycode
is included in Node but that built-in version has been deprecated since v7 (but still present in v20) (https://nodejs.org/api/punycode.html#punycode_punycode). People importpunycode/
to get the installed version and not the built-in Node version (aws/aws-cdk#11099 (comment)).I'm not sure why this isn't working suddenly. The issue above mentions esbuild not supporting the
punycode/
import. Maybe I added something that depends on this import recently, likejsdom
?esbuild
appears intentionally to ignore trailing slashes in imports (https://github.com/evanw/esbuild/blob/2703f90d47fd96f425fedcfd2a5c318a43b04d45/internal/resolver/resolver.go#L374-L384) but also appears to considerpunycode
an internal module (https://github.com/evanw/esbuild/blob/2703f90d47fd96f425fedcfd2a5c318a43b04d45/internal/resolver/resolver.go#L2564C1-L2564C1). So what I think is happening is thatesbuild
is leaving imports likerequire("punycode/")
in the built code, but when it comes to run-time, Node considers these external modules, and so fails to resolve them.Someone solved it by including
punycode
as a Lambda layer (aws/aws-cdk#14290 (comment)).(Why didn't our API 'smoke test' catch this?)
The text was updated successfully, but these errors were encountered: