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

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

Đang mở
#120 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
224
Fork
60
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.