nextjs - 💡(How to fix) Fix turbopack crashes with symlink pointing outside of the repo [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#86572Fetched 2026-04-08 02:10:17
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Error Message

$ RUST_BACKTRACE=full npx next dev --turbopack ⚠ Port 3000 is in use by process 50790, using available port 3001 instead. ▲ Next.js 15.4.7 (Turbopack)

✓ Starting... ○ Compiling instrumentation Node.js ... ✓ Compiled instrumentation Node.js in 610ms ✓ Compiled instrumentation Edge in 11ms Disabling trace exporter in non-production environment Disabling metric reader in non-production environment OTEL_LOGS_EXPORTER is empty. Using default otlp exporter. OTEL_TRACES_EXPORTER is empty. Using default otlp exporter. OpenTelemetry automatic instrumentation started successfully ✓ Ready in 1625ms ⚠ Webpack is configured while Turbopack is not, which may cause problems. ⚠ See instructions if you need to configure Turbopack: https://nextjs.org/docs/app/api-reference/next-config-js/turbopack

○ Compiling / ...

thread 'tokio-runtime-worker' panicked at turbopack/crates/turbo-tasks-fs/src/read_glob.rs:163:62: internal error: entered unreachable code: resolve_symlink_safely() should have resolved all symlinks, but found unresolved symlink at path: 'rules/commit.mdc'. Found path: '.cursor/rules/commit.mdc'. Please report this as a bug. stack backtrace: 0: 0x164bc24d4 - _napi_register_module_v1 1: 0x164be5e54 - _napi_register_module_v1 2: 0x164bbd884 - _napi_register_module_v1 3: 0x164bc2388 - _napi_register_module_v1 4: 0x164bc49e0 - _napi_register_module_v1 5: 0x164bc4830 - _napi_register_module_v1 6: 0x164bc54e0 - _napi_register_module_v1 7: 0x164bc50d0 - _napi_register_module_v1 8: 0x164bc2998 - _napi_register_module_v1 9: 0x164bc4d78 - _napi_register_module_v1 10: 0x164d31e58 - _napi_register_module_v1 11: 0x16374389c - _BrotliDecoderVersion 12: 0x16373c390 - _BrotliDecoderVersion 13: 0x15fe011e4 - <unknown> 14: 0x15fc4d430 - <unknown> 15: 0x15fc19540 - <unknown> 16: 0x15fc184cc - <unknown> 17: 0x15fc4d1d0 - <unknown> 18: 0x15fd6f338 - <unknown> 19: 0x15fbcf4c4 - <unknown> 20: 0x15fbda184 - <unknown> 21: 0x15fbda538 - <unknown> 22: 0x164b8f378 - _napi_register_module_v1 23: 0x164b8e8c4 - _napi_register_module_v1 24: 0x164b60080 - _napi_register_module_v1 25: 0x164b5fb80 - _napi_register_module_v1 26: 0x164b8e0f4 - _napi_register_module_v1 27: 0x164b6751c - _napi_register_module_v1 28: 0x164b76d44 - _napi_register_module_v1 29: 0x164b531dc - _napi_register_module_v1 30: 0x164b4d298 - _napi_register_module_v1 31: 0x164b66154 - _napi_register_module_v1 32: 0x164b88f44 - _napi_register_module_v1 33: 0x164b55ff4 - _napi_register_module_v1 34: 0x164b563a8 - _napi_register_module_v1 35: 0x164bc78f8 - _napi_register_module_v1 36: 0x189e77c0c - __pthread_cond_wait

✓ Compiled / in 3s ○ Compiling /_error ... ✓ Compiled /_error in 635ms GET / 500 in 1184ms

Code Example

ln -s ../agent-rules/some-external-shared-rule.md .cursor/rules/some-external-shared-rule.md

---

$ RUST_BACKTRACE=full npx next dev --turbopack
Port 3000 is in use by process 50790, using available port 3001 instead.
    Next.js 15.4.7 (Turbopack)
   - Local:        http://localhost:3001
   - Network:      http://10.68.68.182:3001
   - Environments: .env

Starting...
Compiling instrumentation Node.js ...
Compiled instrumentation Node.js in 610ms
Compiled instrumentation Edge in 11ms
Disabling trace exporter in non-production environment
Disabling metric reader in non-production environment
OTEL_LOGS_EXPORTER is empty. Using default otlp exporter.
OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.
OpenTelemetry automatic instrumentation started successfully
Ready in 1625ms
Webpack is configured while Turbopack is not, which may cause problems.
  See instructions if you need to configure Turbopack:
  https://nextjs.org/docs/app/api-reference/next-config-js/turbopack

Compiling / ...

thread 'tokio-runtime-worker' panicked at turbopack/crates/turbo-tasks-fs/src/read_glob.rs:163:62:
internal error: entered unreachable code: resolve_symlink_safely() should have resolved all symlinks, but found unresolved symlink at path: 'rules/commit.mdc'. Found path: '.cursor/rules/commit.mdc'. Please report this as a bug.
stack backtrace:
   0:        0x164bc24d4 - _napi_register_module_v1
   1:        0x164be5e54 - _napi_register_module_v1
   2:        0x164bbd884 - _napi_register_module_v1
   3:        0x164bc2388 - _napi_register_module_v1
   4:        0x164bc49e0 - _napi_register_module_v1
   5:        0x164bc4830 - _napi_register_module_v1
   6:        0x164bc54e0 - _napi_register_module_v1
   7:        0x164bc50d0 - _napi_register_module_v1
   8:        0x164bc2998 - _napi_register_module_v1
   9:        0x164bc4d78 - _napi_register_module_v1
  10:        0x164d31e58 - _napi_register_module_v1
  11:        0x16374389c - _BrotliDecoderVersion
  12:        0x16373c390 - _BrotliDecoderVersion
  13:        0x15fe011e4 - <unknown>
  14:        0x15fc4d430 - <unknown>
  15:        0x15fc19540 - <unknown>
  16:        0x15fc184cc - <unknown>
  17:        0x15fc4d1d0 - <unknown>
  18:        0x15fd6f338 - <unknown>
  19:        0x15fbcf4c4 - <unknown>
  20:        0x15fbda184 - <unknown>
  21:        0x15fbda538 - <unknown>
  22:        0x164b8f378 - _napi_register_module_v1
  23:        0x164b8e8c4 - _napi_register_module_v1
  24:        0x164b60080 - _napi_register_module_v1
  25:        0x164b5fb80 - _napi_register_module_v1
  26:        0x164b8e0f4 - _napi_register_module_v1
  27:        0x164b6751c - _napi_register_module_v1
  28:        0x164b76d44 - _napi_register_module_v1
  29:        0x164b531dc - _napi_register_module_v1
  30:        0x164b4d298 - _napi_register_module_v1
  31:        0x164b66154 - _napi_register_module_v1
  32:        0x164b88f44 - _napi_register_module_v1
  33:        0x164b55ff4 - _napi_register_module_v1
  34:        0x164b563a8 - _napi_register_module_v1
  35:        0x164bc78f8 - _napi_register_module_v1
  36:        0x189e77c0c - __pthread_cond_wait

Compiled / in 3s
Compiling /_error ...
Compiled /_error in 635ms
 GET / 500 in 1184ms

---

macOS
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

donthaveone

To Reproduce

Create a symlink pointing to an existing files outside of the Nextjs app

e.g.

ln -s ../agent-rules/some-external-shared-rule.md .cursor/rules/some-external-shared-rule.md

Current vs. Expected behavior

$ RUST_BACKTRACE=full npx next dev --turbopack
 ⚠ Port 3000 is in use by process 50790, using available port 3001 instead.
   ▲ Next.js 15.4.7 (Turbopack)
   - Local:        http://localhost:3001
   - Network:      http://10.68.68.182:3001
   - Environments: .env

 ✓ Starting...
 ○ Compiling instrumentation Node.js ...
 ✓ Compiled instrumentation Node.js in 610ms
 ✓ Compiled instrumentation Edge in 11ms
Disabling trace exporter in non-production environment
Disabling metric reader in non-production environment
OTEL_LOGS_EXPORTER is empty. Using default otlp exporter.
OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.
OpenTelemetry automatic instrumentation started successfully
 ✓ Ready in 1625ms
 ⚠ Webpack is configured while Turbopack is not, which may cause problems.
 ⚠ See instructions if you need to configure Turbopack:
  https://nextjs.org/docs/app/api-reference/next-config-js/turbopack

 ○ Compiling / ...

thread 'tokio-runtime-worker' panicked at turbopack/crates/turbo-tasks-fs/src/read_glob.rs:163:62:
internal error: entered unreachable code: resolve_symlink_safely() should have resolved all symlinks, but found unresolved symlink at path: 'rules/commit.mdc'. Found path: '.cursor/rules/commit.mdc'. Please report this as a bug.
stack backtrace:
   0:        0x164bc24d4 - _napi_register_module_v1
   1:        0x164be5e54 - _napi_register_module_v1
   2:        0x164bbd884 - _napi_register_module_v1
   3:        0x164bc2388 - _napi_register_module_v1
   4:        0x164bc49e0 - _napi_register_module_v1
   5:        0x164bc4830 - _napi_register_module_v1
   6:        0x164bc54e0 - _napi_register_module_v1
   7:        0x164bc50d0 - _napi_register_module_v1
   8:        0x164bc2998 - _napi_register_module_v1
   9:        0x164bc4d78 - _napi_register_module_v1
  10:        0x164d31e58 - _napi_register_module_v1
  11:        0x16374389c - _BrotliDecoderVersion
  12:        0x16373c390 - _BrotliDecoderVersion
  13:        0x15fe011e4 - <unknown>
  14:        0x15fc4d430 - <unknown>
  15:        0x15fc19540 - <unknown>
  16:        0x15fc184cc - <unknown>
  17:        0x15fc4d1d0 - <unknown>
  18:        0x15fd6f338 - <unknown>
  19:        0x15fbcf4c4 - <unknown>
  20:        0x15fbda184 - <unknown>
  21:        0x15fbda538 - <unknown>
  22:        0x164b8f378 - _napi_register_module_v1
  23:        0x164b8e8c4 - _napi_register_module_v1
  24:        0x164b60080 - _napi_register_module_v1
  25:        0x164b5fb80 - _napi_register_module_v1
  26:        0x164b8e0f4 - _napi_register_module_v1
  27:        0x164b6751c - _napi_register_module_v1
  28:        0x164b76d44 - _napi_register_module_v1
  29:        0x164b531dc - _napi_register_module_v1
  30:        0x164b4d298 - _napi_register_module_v1
  31:        0x164b66154 - _napi_register_module_v1
  32:        0x164b88f44 - _napi_register_module_v1
  33:        0x164b55ff4 - _napi_register_module_v1
  34:        0x164b563a8 - _napi_register_module_v1
  35:        0x164bc78f8 - _napi_register_module_v1
  36:        0x189e77c0c - __pthread_cond_wait

 ✓ Compiled / in 3s
 ○ Compiling /_error ...
 ✓ Compiled /_error in 635ms
 GET / 500 in 1184ms

Provide environment information

macOS

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

Turbopack

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

next dev (local)

Additional context

No response

extent analysis

TL;DR

The issue can be fixed by removing or resolving the symlinks in the project directory, as Turbopack is not handling them correctly.

Guidance

  • Remove the symlinks created in the project directory, such as the one created by ln -s ../agent-rules/some-external-shared-rule.md .cursor/rules/some-external-shared-rule.md.
  • Verify that there are no other symlinks in the project directory that could be causing the issue.
  • If the symlinks are necessary, consider using a different approach, such as copying the files instead of creating symlinks.
  • Check the Turbopack documentation for any updates or configuration options that may help resolve the issue with symlinks.

Example

No code snippet is provided as the issue is related to the project configuration and file system.

Notes

The issue seems to be specific to the Turbopack configuration and the use of symlinks in the project directory. Removing the symlinks or finding an alternative approach may resolve the issue.

Recommendation

Apply workaround: Remove the symlinks in the project directory, as this is the most straightforward solution to resolve the issue with Turbopack.

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