Skip to content

Upgrade @vercel/nft to 0.27.4 to include ESM module.register hooks #2703

@s1gr1d

Description

@s1gr1d

Environment

ESM

Reproduction

Link: https://github.com/s1gr1d/nitro-sentry-iitm

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
image image

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:

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions