nextjs - 💡(How to fix) Fix [Turbopack]: Fails to build `scalar` [2 comments, 3 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#89675Fetched 2026-04-08 02:02:28
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Timeline (top)
commented ×2labeled ×2closed ×1issue_type_added ×1

Error Message

▲ Next.js 16.1.6 (Turbopack)

Creating an optimized production build ...


FATAL: An unexpected Turbopack error occurred. A panic log has been written to C:\Users\baseplate-admin\AppData\Local\Temp\next-panic-6cacacc1fe20a1c64325df3dbeddf2fb.log.

To help make Turbopack better, report this error by clicking here.

Build error occurred Error [TurbopackInternalError]: NftJsonAsset: cannot handle filepath url

Debug info:

  • Execution of get_all_written_entrypoints_with_issues_operation failed
  • Execution of EntrypointsOperation::new failed
  • Execution of all_entrypoints_write_to_disk_operation failed
  • Execution of Project::emit_all_output_assets failed
  • Execution of emit_assets failed
  • Execution of emit failed
  • Execution of <NftJsonAsset as Asset>::content failed
  • NftJsonAsset: cannot handle filepath url at <unknown> (TurbopackInternalError: NftJsonAsset: cannot handle filepath url) { type: 'TurbopackInternalError', location: undefined }

Code Example

Next.js 16.1.6 (Turbopack)

  Creating an optimized production build ...

-----
FATAL: An unexpected Turbopack error occurred. A panic log has been written to C:\Users\baseplate-admin\AppData\Local\Temp\next-panic-6cacacc1fe20a1c64325df3dbeddf2fb.log.

To help make Turbopack better, report this error by clicking here.
-----


> Build error occurred
Error [TurbopackInternalError]: NftJsonAsset: cannot handle filepath url

Debug info:
- Execution of get_all_written_entrypoints_with_issues_operation failed
- Execution of EntrypointsOperation::new failed
- Execution of all_entrypoints_write_to_disk_operation failed
- Execution of Project::emit_all_output_assets failed
- Execution of emit_assets failed
- Execution of emit failed
- Execution of <NftJsonAsset as Asset>::content failed
- NftJsonAsset: cannot handle filepath url
    at <unknown> (TurbopackInternalError: NftJsonAsset: cannot handle filepath url) {
  type: 'TurbopackInternalError',
  location: undefined
}

---

---------------------------
NftJsonAsset: cannot handle filepath url

Debug info:
- Execution of get_all_written_entrypoints_with_issues_operation failed
- Execution of EntrypointsOperation::new failed
- Execution of all_entrypoints_write_to_disk_operation failed
- Execution of Project::emit_all_output_assets failed
- Execution of emit_assets failed
- Execution of emit failed
- Execution of <NftJsonAsset as Asset>::content failed
- NftJsonAsset: cannot handle filepath url

---

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro for Workstations
  Available memory (MB): 31802
  Available CPU cores: 16
Binaries:
  Node: 25.3.0
  npm: 11.6.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 16.1.6 // Latest available version is detected (16.1.6).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  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/baseplate-admin/next-issue-89675

To Reproduce

For turbopack:

  1. npm run build

For webpack

  1. npm run build:webpack

Current vs. Expected behavior

I expected npm run build to act similar to npm run build:webpack, but it did not.

▲ Next.js 16.1.6 (Turbopack)

  Creating an optimized production build ...

-----
FATAL: An unexpected Turbopack error occurred. A panic log has been written to C:\Users\baseplate-admin\AppData\Local\Temp\next-panic-6cacacc1fe20a1c64325df3dbeddf2fb.log.

To help make Turbopack better, report this error by clicking here.
-----


> Build error occurred
Error [TurbopackInternalError]: NftJsonAsset: cannot handle filepath url

Debug info:
- Execution of get_all_written_entrypoints_with_issues_operation failed
- Execution of EntrypointsOperation::new failed
- Execution of all_entrypoints_write_to_disk_operation failed
- Execution of Project::emit_all_output_assets failed
- Execution of emit_assets failed
- Execution of emit failed
- Execution of <NftJsonAsset as Asset>::content failed
- NftJsonAsset: cannot handle filepath url
    at <unknown> (TurbopackInternalError: NftJsonAsset: cannot handle filepath url) {
  type: 'TurbopackInternalError',
  location: undefined
}

Contents:

---------------------------
NftJsonAsset: cannot handle filepath url

Debug info:
- Execution of get_all_written_entrypoints_with_issues_operation failed
- Execution of EntrypointsOperation::new failed
- Execution of all_entrypoints_write_to_disk_operation failed
- Execution of Project::emit_all_output_assets failed
- Execution of emit_assets failed
- Execution of emit failed
- Execution of <NftJsonAsset as Asset>::content failed
- NftJsonAsset: cannot handle filepath url

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro for Workstations
  Available memory (MB): 31802
  Available CPU cores: 16
Binaries:
  Node: 25.3.0
  npm: 11.6.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 16.1.6 // Latest available version is detected (16.1.6).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  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)

Additional context

No response

extent analysis

TL;DR

  • The issue can likely be resolved by adjusting the configuration or code related to NftJsonAsset to handle filepath URLs correctly in Turbopack.

Guidance

  • Review the code that utilizes NftJsonAsset to ensure it properly handles filepath URLs, potentially by converting them to a format that NftJsonAsset can process.
  • Verify that the next configuration does not contain any settings that might be causing NftJsonAsset to fail, such as incorrect paths or asset handling configurations.
  • Consider temporarily switching to webpack to build the project (npm run build:webpack) to isolate if the issue is specific to Turbopack.
  • Check for any updates or issues related to NftJsonAsset and Turbopack in the Next.js documentation or community forums.

Example

No specific code example can be provided without more details on how NftJsonAsset is being used in the project.

Notes

The exact solution depends on the specific implementation of NftJsonAsset in the project, which is not provided in the issue details. The guidance provided is based on the error message indicating an issue with handling filepath URLs.

Recommendation

  • Apply workaround: Adjust the code or configuration related to NftJsonAsset to correctly handle filepath URLs, as the issue seems specific to Turbopack and not a version-related problem with Next.js.

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