fix: preserve Next package boundary in node functions#63
Conversation
|
@privatenumber is attempting to deploy a commit to the vtest314-next-adapter-e2e-tests Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 63d7965 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Context for reviewers: this seems related to the Next 16.2 adapter rollout in vercel/next.js#88247 and #6. cc @ijjk in case you have useful context on the intended packaging invariant here. The important bit for this PR is that the generated .next/package.json package boundary is referenced in filePathMap but also needs to be present on disk for Node module type resolution. |
0315dfc to
43fb5a2
Compare
dffd51b to
8fd97fb
Compare
8fd97fb to
63d7965
Compare
|
This needs to be fixed in Next.js instead. Opened the PR here: vercel/next.js#93612 |
|
Merged vercel/next.js#93612 |
Problem
Next 16.2 emits Node route files under .next/server as CommonJS and writes .next/package.json with type commonjs. The adapter records that file in filePathMap, but the generated function directory does not physically contain it, so Node can fall through to an app/root package.json with type module and fail when ___next_launcher.cjs requires the route file.
Fixes vercel/next.js#91661.
Changes