nextjs - 💡(How to fix) Fix Turbopack not parsing `${configDir}` used in extended base tsconfig.json leads to errors [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#86142Fetched 2026-04-08 02:12:22
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Error Message

  1. Notice that app-with-error fails because of Import map: aliased to relative './components/Center' inside of [project]/rigs/web-rig/profiles/default/config/typescript/${configDir}/src

Root Cause

  1. From root, run rush update && rush build
  2. Notice that app-with-error fails because of Import map: aliased to relative './components/Center' inside of [project]/rigs/web-rig/profiles/default/config/typescript/${configDir}/src

Code Example

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 31923
  Available CPU cores: 16
Binaries:
  Node: 22.21.1
  npm: 10.9.4
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.3 // Latest available version is detected (16.0.3).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/eliw00d/next-turbopack-configdir-repro

To Reproduce

  1. From root, run rush update && rush build
  2. Notice that app-with-error fails because of Import map: aliased to relative './components/Center' inside of [project]/rigs/web-rig/profiles/default/config/typescript/${configDir}/src

Current vs. Expected behavior

Current behavior

Building a Next.js app that extends another tsconfig.json does not parse ${configDir} and throws errors related to the import map.

Expected behavior

Building a Next.js app that extends another tsconfig.json parses ${configDir} and builds successfully.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 31923
  Available CPU cores: 16
Binaries:
  Node: 22.21.1
  npm: 10.9.4
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.3 // Latest available version is detected (16.0.3).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Turbopack

Which stage(s) are affected? (Select all that apply)

next build (local), next dev (local), next start (local)

Additional context

No response

extent analysis

TL;DR

  • The issue can be fixed by properly configuring the tsconfig.json file to parse the ${configDir} variable.

Guidance

  • Verify that the tsconfig.json file is correctly extending the base configuration and that the configDir variable is properly defined.
  • Check the next-turbopack configuration to ensure it is compatible with the version of next being used (16.0.3).
  • Investigate the possibility of using a different method to parse the configDir variable, such as using environment variables or a custom configuration script.
  • Review the rush build and rush update commands to ensure they are correctly configured to handle the tsconfig.json file and the configDir variable.

Example

No code example is provided as the issue is related to configuration and not a specific code snippet.

Notes

  • The issue seems to be related to the next-turbopack configuration and the tsconfig.json file, but more information would be needed to provide a definitive solution.
  • The use of rush update and rush build commands may be affecting the build process, but their exact impact is unclear.

Recommendation

  • Apply workaround: The issue can be mitigated by reconfiguring the tsconfig.json file and the next-turbopack configuration to properly handle the configDir variable. This may involve using environment variables or a custom configuration script.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix Turbopack not parsing `${configDir}` used in extended base tsconfig.json leads to errors [1 comments, 2 participants]