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

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

未关闭
#120 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
224
派生
60
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。