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
{{ message }}
Repository navigation
Imports and requires may not be using Node Loaders/Registration for ESM #120
I'm not clear why the two are not working together, as they work in other contexts - but in the AWS SAM index.mjs it seems that the tryRequire path goes through a route where pnp.setup(); is unable to monkey patch calls once it is working within the CJS loader by route of the ESM loader.
Activity
Downchuck commentedon Nov 20, 2024
Cross posting the current work-around as a loader, using
-r /opt/nodejs/.pnp.cjs --loader /var/task/hackey-hack.mjs: