Skip to content

Revert "Turbopack: compact re-export registration (#98617)" - #99082

Closed
mischnic wants to merge 1 commit into
canaryfrom
mischnic/revert-compact-exports
Closed

mischnic wants to merge 1 commit into
canaryfrom
mischnic/revert-compact-exports

Conversation

@mischnic

Copy link
Copy Markdown
Member

Reverts #98617

- Failed to write app endpoint /bar
- Execution of AppEndpoint::output failed
- Execution of AppEndpoint::app_entry_chunks failed
- Execution of *entry_chunk_group_asset failed
- Execution of ChunkGroupResult::referenced_assets failed
- Execution of chunk_group_assets failed
- Execution of *ChunkGroupResult::output_assets_with_referenced failed
- Execution of <NodeJsChunkingContext as ChunkingContext>::chunk_group failed
- Execution of make_chunks failed
- Execution of batch_chunk_items_with_info_with_type failed
- Execution of chunk_items_with_info_with_type failed
- Execution of batch_size failed
- Execution of <EcmascriptChunkType as ChunkType>::chunk_item_size failed
- Execution of <MergedEcmascriptModule as EcmascriptChunkPlaceable>::chunk_item_content failed
- Execution of *EcmascriptChunkItemContent::new failed
- Execution of EcmascriptModuleContent::new_merged failed
- ModuleId not found for ident: foo.js [app-rsc] (ecmascript)
    at <unknown> (TurbopackInternalError: Failed to write app endpoint /bar) {
  location: undefined
}

@mischnic
mischnic force-pushed the mischnic/revert-compact-exports branch from 52b3692 to 4e48039 Compare September 23, 2026 08:07
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: 4e48039 | About building and testing Next.js

pnpm test-start-experimental-turbo test/e2e/app-dir/syntax-highlighter-crash/syntax-highlighter-crash.test.ts (turbopack) (Experimental) (job)

  • syntax-highlighter-crash > should render the page (DD)
Expand output

● syntax-highlighter-crash › should render the page

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-experimental-turbo test/e2e/api-catch-all/api-catch-all.test.ts (turbopack) (Experimental) (job)

  • API routes > should return data when catch-all (DD)
  • API routes > should return redirect when catch-all with index and trailing slash (DD)
  • API routes > should return data when catch-all with index and trailing slash (DD)
  • API routes > should return data when catch-all with index and no trailing slash (DD)
Expand output

● API routes › should return data when catch-all

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● API routes › should return redirect when catch-all with index and trailing slash

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● API routes › should return data when catch-all with index and trailing slash

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● API routes › should return data when catch-all with index and no trailing slash

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-experimental-turbo test/e2e/app-dir/_allow-underscored-root-directory/_allow-underscored-root-directory.test.ts (turbopack) (Experimental) (job)

  • _allow-underscored-root-directory > should not serve app path with underscore (DD)
  • _allow-underscored-root-directory > should pages path with a underscore at the root (DD)
  • _allow-underscored-root-directory > should serve app path with %5F (DD)
Expand output

● _allow-underscored-root-directory › should not serve app path with underscore

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● _allow-underscored-root-directory › should pages path with a underscore at the root

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● _allow-underscored-root-directory › should serve app path with %5F

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-experimental-turbo test/e2e/next-image-new/app-dir-image-from-node-modules/app-dir-image-from-node-modules.test.ts (turbopack) (Experimental) (job)

  • app-dir Image Component from node_modules > should apply image config for node_modules (DD)
Expand output

● app-dir Image Component from node_modules › should apply image config for node_modules

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-experimental-turbo test/production/app-dir/barrel-optimization/mui/index.test.ts (turbopack) (Experimental) (job)

  • Skipped in Turbopack > app-dir - optimizePackageImports - mui > should build successfully (DD)
Expand output

● Skipped in Turbopack › app-dir - optimizePackageImports - mui › should build successfully

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-experimental-turbo test/e2e/next-image-new/image-from-node-modules/image-from-node-modules.test.ts (turbopack) (Experimental) (job)

  • Image Component from node_modules > should apply image config for node_modules (DD)
  • Image Component from node_modules > should warn when using images.domains config (DD)
Expand output

● Image Component from node_modules › should apply image config for node_modules

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● Image Component from node_modules › should warn when using images.domains config

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-turbo test/e2e/app-dir/app-external/app-external.test.ts (turbopack) (job)

  • app dir - external dependency > should be able to opt-out 3rd party packages being bundled in server components (DD)
  • app dir - external dependency > should handle external async module libraries correctly (DD)
  • app dir - external dependency > should transpile specific external packages with the transpilePackages option (DD)
  • app dir - external dependency > should resolve the subset react in server components based on the react-server condition (DD)
  • app dir - external dependency > should resolve 3rd party package exports based on the react-server condition (DD)
  • app dir - external dependency > should correctly collect global css imports and mark them as side effects (DD)
  • app dir - external dependency > should handle external css modules (DD)
  • app dir - external dependency > should use the same export type for packages in both ssr and client (DD)
  • app dir - external dependency > should handle external css modules in pages (DD)
  • app dir - external dependency > should handle external next/font (DD)
  • app dir - external dependency > should not apply swc optimizer transform for external packages in browser layer in web worker (DD)
  • app dir - external dependency > should emit cjs helpers for external cjs modules when compiled (DD)
  • app dir - external dependency > should export client module references in esm (DD)
  • app dir - external dependency > should support client module references with SSR-only ESM externals (DD)
  • app dir - external dependency > should support exporting multiple star re-exports (DD)
  • app dir - external dependency > should have proper tree-shaking for known modules in CJS (DD)
  • app dir - external dependency > should use the same async storages if imported directly (DD)
  • app dir - external dependency > app route > should resolve next/server api from external esm package (DD)
  • app dir - external dependency > mixed syntax external modules > should handle mixed module with next/dynamic (DD)
  • app dir - external dependency > mixed syntax external modules > should handle mixed module in server and client components (DD)
  • app dir - external dependency > react in external esm packages > should use the same react in client app (DD)
  • app dir - external dependency > react in external esm packages > should use the same react in server app (DD)
  • app dir - external dependency > react in external esm packages > should use the same react in edge server app (DD)
  • app dir - external dependency > react in external esm packages > should use the same react in pages (DD)
  • app dir - external dependency > react in external esm packages > should support namespace import with ESM packages (DD)
  • app dir - external dependency > react in external esm packages > should apply serverExternalPackages inside of node_modules (DD)
  • app dir - external dependency > server actions > should prefer to resolve esm over cjs for bundling optout packages (DD)
  • app dir - external dependency > server actions > should compile server actions from node_modules in client components (DD)
Expand output

● app dir - external dependency › should be able to opt-out 3rd party packages being bundled in server components

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should handle external async module libraries correctly

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should transpile specific external packages with the transpilePackages option

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should resolve the subset react in server components based on the react-server condition

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should resolve 3rd party package exports based on the react-server condition

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should correctly collect global css imports and mark them as side effects

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should handle external css modules

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should use the same export type for packages in both ssr and client

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should handle external css modules in pages

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should handle external next/font

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should not apply swc optimizer transform for external packages in browser layer in web worker

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › react in external esm packages › should use the same react in client app

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › react in external esm packages › should use the same react in server app

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › react in external esm packages › should use the same react in edge server app

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › react in external esm packages › should use the same react in pages

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › react in external esm packages › should support namespace import with ESM packages

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › react in external esm packages › should apply serverExternalPackages inside of node_modules

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › mixed syntax external modules › should handle mixed module with next/dynamic

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › mixed syntax external modules › should handle mixed module in server and client components

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should emit cjs helpers for external cjs modules when compiled

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should export client module references in esm

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should support client module references with SSR-only ESM externals

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should support exporting multiple star re-exports

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app dir - external dependency › should have proper tree-shaking for known modules in CJS

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
>

... truncated ...

pnpm test-start-turbo test/e2e/api-catch-all/api-catch-all.test.ts (turbopack) (job)

  • API routes > should return data when catch-all (DD)
  • API routes > should return redirect when catch-all with index and trailing slash (DD)
  • API routes > should return data when catch-all with index and trailing slash (DD)
  • API routes > should return data when catch-all with index and no trailing slash (DD)
Expand output

● API routes › should return data when catch-all

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● API routes › should return redirect when catch-all with index and trailing slash

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● API routes › should return data when catch-all with index and trailing slash

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● API routes › should return data when catch-all with index and no trailing slash

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-turbo test/e2e/app-dir/_allow-underscored-root-directory/_allow-underscored-root-directory.test.ts (turbopack) (job)

  • _allow-underscored-root-directory > should not serve app path with underscore (DD)
  • _allow-underscored-root-directory > should pages path with a underscore at the root (DD)
  • _allow-underscored-root-directory > should serve app path with %5F (DD)
Expand output

● _allow-underscored-root-directory › should not serve app path with underscore

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● _allow-underscored-root-directory › should pages path with a underscore at the root

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● _allow-underscored-root-directory › should serve app path with %5F

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-turbo test/e2e/app-dir/app-esm-js/standalone.test.ts (turbopack) (job)

  • output: standalone with ESM app dir > should work correctly with output standalone (DD)
Expand output

● output: standalone with ESM app dir › should work correctly with output standalone

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-turbo test/production/app-dir/client-components-tree-shaking/index.test.ts (turbopack) (job)

  • app-dir client-components-tree-shaking > should only include imported components 3rd party package in browser bundle with direct imports (DD)
  • app-dir client-components-tree-shaking > should only include the imported identifier of CJS module in browser bundle (DD)
  • app-dir client-components-tree-shaking > should able to resolve the client module entry with mixing rexports (DD)
  • app-dir client-components-tree-shaking > should handle mixing namespace imports and named imports from client components (DD)
  • app-dir client-components-tree-shaking > should only include imported relative components in browser bundle with direct imports (DD)
Expand output

● app-dir client-components-tree-shaking › should only include imported components 3rd party package in browser bundle with direct imports

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app-dir client-components-tree-shaking › should only include the imported identifier of CJS module in browser bundle

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app-dir client-components-tree-shaking › should able to resolve the client module entry with mixing rexports

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app-dir client-components-tree-shaking › should handle mixing namespace imports and named imports from client components

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

● app-dir client-components-tree-shaking › should only include imported relative components in browser bundle with direct imports

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-turbo test/e2e/app-dir/rsc-basic/rsc-basic-blocking-ssr.test.ts (turbopack) (job)

  • react@experimental - blockingSSR > should opt into the react@experimental channel when blockingSSR is enabled (DD)
Expand output

● react@experimental - blockingSSR › should opt into the react@experimental channel when blockingSSR is enabled

next build failed with code/signal 1

  137 |             if (code || signal)
  138 |               reject(
> 139 |                 new Error(
      |                 ^
  140 |                   `next build failed with code/signal ${code || signal}`
  141 |                 )
  142 |               )

  at ChildProcess.<anonymous> (lib/next-modes/next-start.ts:139:17)

pnpm test-start-turbo test/e2e/app-dir/rsc-basic/rsc-basic.test.ts (turbopack) (job)

  • app dir - rsc basics > should correctly render page returning null (DD)
  • app dir - rsc basics > should correctly render component returning null (DD)
  • app dir - rsc basics > should correctly render layout returning null (DD)
  • app dir - rsc basics > should correctly render page returning undefined (DD)
  • app dir - rsc basics > should correctly render component returning undefined (DD)
  • app dir - rsc basics > should correctly render layout returning undefined (DD)
  • app dir - rsc basics > should handle named client components imported as page (DD)
  • app dir - rsc basics > should handle client components imported as namespace (DD)
  • app dir - rsc basics > should render server components correctly (DD)
  • app dir - rsc basics > should reuse the inline flight response without sending extra requests (DD)
  • app dir - rsc basics > should support multi-level server component imports (DD)
  • app dir - rsc basics > should create client reference successfully for all file conventions (DD)
  • app dir - rsc basics > should be able to navigate between rsc routes (DD)
  • app dir - rsc basics > should handle streaming server components correctly (DD)
  • app dir - rsc basics > should track client components in dynamic imports (DD)
  • app dir - rsc basics > should support next/link in server components (DD)
  • app dir - rsc basics > should link correctly with next/link without mpa navigation to the page (DD)
  • app dir - rsc basics > should escape streaming data correctly (DD)
  • app dir - rsc basics > should render built-in 404 page for missing route if pagesDir is not presented ([DD](https://app.datadoghq.com/ci/test/runs?query=%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22+%40git.commit.head_sha%3A%224e48039bfd749a1bba52c91320607233b2ddb67f%22+%40test.name%3A%22app+dir+-+rsc+basics+should+render+built-in+404+page+for+missing+route+if+pagesDir+is+not+presented%22+%40test

... truncated to fit in one GitHub comment ...

@mischnic mischnic closed this Sep 23, 2026
@mischnic
mischnic deleted the mischnic/revert-compact-exports branch September 23, 2026 11:34
mischnic added a commit that referenced this pull request Sep 23, 2026
sokra added a commit that referenced this pull request Sep 24, 2026
### What?

Generate **both RSC client-reference proxies and WebAssembly loaders**
under their graph-backed wrapper module identities, using one shared,
higher-level content helper. Remove both generated-path exceptions from
`BindingUsageInfo::used_exports` and the earlier proxy-specific export
filter.

### Why?

The wrapper is the module in Turbopack's graph, but its chunk item
previously delegated code generation to a separately processed virtual
JS module. Export-usage lookup for that proxy/loader missed the graph
and fell back to “all exports used.” In a `sideEffects: false` barrel
this could register a pruned client export and request a missing
`<locals>` module ID. The WebAssembly loader had the same graph-identity
mismatch, hidden by a separate filename-based fallback.

Canary's #99102 now guards against the client-reference missing-ID
symptom by checking pruned references. This PR fixes the upstream
identity mismatch instead so `expand_exports()` sees real usage;
#99102's independent safety checks remain in place.

### How?

`chunk_item_content_with_code_from(graph_module, code_source, ...)`
takes the generated source's analyzed program, references, exports,
source map and async behavior while using the wrapper for the *whole
code-generation module context*. Both client-reference and WASM wrappers
call it. This replaces the public low-level `with_module_context`
setter; it does not change module IDs, WASM output assets, React Flight
registration, or the existing single-chunk WASM rejection. sokra's
`ResolvedVc` suggestions are also applied.

#99090's pruned-reexport-source guard remains necessary: removing it
independently still fails its execution fixture. #99082 proposed
reverting all of #98617 and closed unmerged; it was not a separate fix
to delete.

The neutral production proxy regression and two supplemental
pruned-source execution fixtures remain in the PR.

### Verification

- **WASM can-fail/can-pass:** all 3 existing WASM execution fixtures
pass before removing the fallback; with the fallback removed but old
loader delegation retained, all 3 fail `export usage not found
...wasm_.loader.mjs`; with the shared helper, all 3 pass (instantiation,
imported functions/memory, and `?module` compilation).
- **Proxy can-fail/can-pass:** without the wrapper-context path and
proxy fallback, the production fixture fails `export usage not found
.../__nextjs-internal-proxy.mjs`; with the fix it passes.
- **Rust/build:** 1,282 tests pass across affected crates; clippy (`-D
warnings`), rustfmt and `pnpm build-all` (18/18 tasks) pass.
- **Next.js integration:** Turbopack production 6 suites/12 tests
(proxy, used client references, #99102 regression, edge WASM and WASM
output tracing); development 3 suites/8 tests (proxy, used client
references and edge WASM). Client-reference chunking 1/1. After rebasing
onto current canary, `pnpm build-all` and focused proxy/edge WASM
production tests (3 suites/7 tests) pass again.

<!-- NEXT_JS_LLM -->

<!-- fleet ecdfa248-cd54-41ac-b4a2-c9d49e2a67ee -->

---------

Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
Co-authored-by: Luke Sandberg <210140+lukesandberg@users.noreply.github.com>
@github-actions github-actions Bot added the locked label Oct 7, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants