Skip to content

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Sep 25, 2025

This PR unblocks our CI which was failing because:

  • Nuxt and SolidStart rely on nitro which relies on on @vercel/nft
  • import-in-the-middle received a bug fix which mixes require and import statements in hooks.mjs. This was released in 1.14.3
  • Apparently, nft can't trace modules that use both, import and require statements, so the require'd hooks.js file is not added to the subset of modules nft returns (we're working on a minimal reproduction and bug report for nft)

As a result, we have to pin IITM to the version before the bugfix (1.14.2) until either IITM reverts/fixes the fix or NFT releases a fix. The terrible part about this though is that users have to do the same thing for now and there's nothing we can do besides documenting to add an override for IITM.

Being a JS developer is fun they said...

@Lms24 Lms24 changed the title test(e2e): Pin [email protected] due to vercel/nft incompatibility test(e2e): Pin [email protected] due to @vercel/nft incompatibility Sep 25, 2025
@Lms24 Lms24 self-assigned this Sep 25, 2025
@Lms24 Lms24 merged commit ae747ad into develop Sep 25, 2025
42 checks passed
@Lms24 Lms24 deleted the lms/test-e2e-fix-iitm-nft-bug branch September 25, 2025 09:57
Lms24 added a commit that referenced this pull request Sep 25, 2025
…uilding the Lambda layer (#17780)

this is actually a fix but not a user-facing one, therefore, `ref`.

Starting with `1.14.3`, `import-in-the-middle` uses both, `import` and
`require` statements in its `hook.mjs` file. This caused `@vercel/nft`
in its default config to _not_ trace the required `hook.js` file (+ all
of its dependencies). This PR enables `mixedModules: true` to trace
both, requires and imports. In contrast to #17777, we therefore don't
have to override the IITM version and we also don't have to revert this
PR.
Lms24 added a commit that referenced this pull request Sep 25, 2025
…nft` incompatibility (#17777)"

This reverts commit ae747ad.
Lms24 added a commit that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants