aws / aws/aws-lambda-nodejs-runtime-interface-client

Imports and requires may not be using Node Loaders/Registration for ESM

Abierto
#120 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
224
Forks
60
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

The Yarn PNP mechanism uses loaders and/or registration for CJS and ESM support.

Presently using `-r .pnp.cjs` works appropriately in AWS SAM but using `--loader` runs into a host of issues as detailed in:

https://github.com/yarnpkg/berry/issues/6604

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.