Skip to content

Conversation

@fireairforce
Copy link
Contributor

turbopack-resolve alias lost query as the following case:

import a from '@/a?query'

console.log(a);

alias config is:

resolveAlias: {
  '@/*': './app/*'
}

The query param will lost, i fix this and add some test case.

@nextjs-bot nextjs-bot added tests Turbopack Related to Turbopack with Next.js. labels Jan 22, 2026
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 22, 2026

Failing test suites

Commit: 7222807 | About building and testing Next.js

pnpm test-start test/e2e/app-dir/actions/app-action.test.ts (job)

  • app-dir action handling > should trigger a refresh for a server action that also dispatches a navigation event (DD)
  • app-dir action handling > fetch actions > should handle revalidatePath (DD)
  • app-dir action handling > fetch actions > should handle revalidateTag (DD)
  • app-dir action handling > fetch actions > should store revalidation data in the prefetch cache (DD)
  • app-dir action handling > fetch actions > should revalidate when cookies.set is called (DD)
  • app-dir action handling > fetch actions > should revalidate when cookies.set is called in a client action (DD)
  • app-dir action handling > fetch actions > should invalidate client cache when tag is revalidated (DD)
  • app-dir action handling > fetch actions > should invalidate client cache when path is revalidated (DD)
Expand output

● app-dir action handling › should trigger a refresh for a server action that also dispatches a navigation event

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#justputit') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
  at Object.elementById (e2e/app-dir/actions/app-action.test.ts:575:42)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at Object.text (e2e/app-dir/actions/app-action.test.ts:575:67)

● app-dir action handling › fetch actions › should handle revalidatePath

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#random-number') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Object.elementByCss (e2e/app-dir/actions/app-action.test.ts:1322:42)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at Object.text (e2e/app-dir/actions/app-action.test.ts:1322:73)

● app-dir action handling › fetch actions › should handle revalidateTag

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#random-number') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Object.elementByCss (e2e/app-dir/actions/app-action.test.ts:1345:42)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at Object.text (e2e/app-dir/actions/app-action.test.ts:1345:73)

● app-dir action handling › fetch actions › should store revalidation data in the prefetch cache

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#justputit') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Object.elementByCss (e2e/app-dir/actions/app-action.test.ts:1392:39)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at Object.text (e2e/app-dir/actions/app-action.test.ts:1392:66)

● app-dir action handling › fetch actions › should revalidate when cookies.set is called

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#random-cookie')

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Object.elementByCss (e2e/app-dir/actions/app-action.test.ts:1419:10)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at Object.text (e2e/app-dir/actions/app-action.test.ts:1420:10)

● app-dir action handling › fetch actions › should revalidate when cookies.set is called in a client action

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#random-cookie') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at elementByCss (e2e/app-dir/actions/app-action.test.ts:1470:25)
  at fn (lib/next-test-utils.ts:799:20)
  at Object.<anonymous> (e2e/app-dir/actions/app-action.test.ts:1468:7)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at text (e2e/app-dir/actions/app-action.test.ts:1470:56)
  at fn (lib/next-test-utils.ts:799:20)
  at Object.<anonymous> (e2e/app-dir/actions/app-action.test.ts:1468:7)

● app-dir action handling › fetch actions › should invalidate client cache when tag is revalidated

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#thankyounext') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at elementByCss (e2e/app-dir/actions/app-action.test.ts:1521:40)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at text (e2e/app-dir/actions/app-action.test.ts:1521:70)

● app-dir action handling › fetch actions › should invalidate client cache when path is revalidated

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#thankyounext') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at elementByCss (e2e/app-dir/actions/app-action.test.ts:1521:40)
  at Proxy._chain (lib/browsers/playwright.ts:651:23)
  at Proxy._chain (lib/browsers/playwright.ts:627:17)
  at Proxy.continueChain (lib/browsers/playwright.ts:433:17)
  at text (e2e/app-dir/actions/app-action.test.ts:1521:70)

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 22, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing fireairforce:fix-resource-query-alias (7222807) with canary (61bf6f6)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mischnic
Copy link
Member

This is strange, maybe some infinite loop/recursion?

  FAIL Turbopack test/production/pages-dir/production/test/index.test.ts (121.294 s)

    Creating an optimized production build ...
  Failed to create next instance Error: next build failed with code/signal SIGKILL
      at ChildProcess.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/lib/next-modes/next-start.ts:79:17)
      at ChildProcess.emit (node:events:514:28)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)
  Stopped next server
  destroyed next instance: 141.002ms

@fireairforce fireairforce force-pushed the fix-resource-query-alias branch from cbd4c37 to 7222807 Compare January 22, 2026 14:57
@fireairforce
Copy link
Contributor Author

This is strange, maybe some infinite loop/recursion?

  FAIL Turbopack test/production/pages-dir/production/test/index.test.ts (121.294 s)

    Creating an optimized production build ...
  Failed to create next instance Error: next build failed with code/signal SIGKILL
      at ChildProcess.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/lib/next-modes/next-start.ts:79:17)
      at ChildProcess.emit (node:events:514:28)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)
  Stopped next server
  destroyed next instance: 141.002ms

add a judge for that case, now the test case will be passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Turbopack Related to Turbopack with Next.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants