-
-
Notifications
You must be signed in to change notification settings - Fork 783
Description
Environment
ESM
Reproduction
This is how import-in-the-middle (IITM) looks like in .output/server/node_modules:
| Without resolution (uses @vercel/nft 0.26.x) | With @vercel/nft package resolution to 0.27.4 |
|---|---|
![]() |
![]() |
Describe the bug
Previous versions of @vercel/nft do not include ESM module.register hooks so the @opentelemetry/instrumentation/hook.mjs is not included, which leads to errors when starting the server if opentelemetry or packages that depend on it (like Sentry) are used.
@vercel/nft released a new version with the fix, but as it is still a 0 major version, the caret (^) does not work like usual. With 0 major versions, only the patch is automatically updated, but not the minor (npm source).
The current release of nitro depends on ^0.26.5 and the fix is included in 0.27.4 (another minor version).
It would be awesome to release a new nitro version (minor or patch), which includes this @vercel/nft minor version upgrade 🙌
Additional context
Issue Reference:
- Does not include registered ESM loader hooks vercel/nft#428
- Problems with
@sentry/astroon Netlify getsentry/sentry-javascript#12603 (netlify-related, but this uses nft as well) - includes a reproduction
Logs
No response

