nextjs - 💡(How to fix) Fix error importing statics assets when `next build --turbopack` + middleware [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#83951Fetched 2026-04-08 02:21:00
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1issue_type_added ×1

Code Example

next 15.5.3
intlayer / next-intlayer 5.8.1
macos
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/ebsaral/Logical-Spirituality/tree/nextjs

To Reproduce

  1. git clone https://github.com/ebsaral/Logical-Spirituality/tree/nextjs
  2. cd ./next
  3. npm i
  4. next build --turbopack
  5. next start

Current vs. Expected behavior

<img width="1177" height="708" alt="Image" src="https://github.com/user-attachments/assets/2a2dc8e3-a495-4f68-8508-8ef4e754ce72" />

Fail to import static assets

Provide environment information

next 15.5.3
intlayer / next-intlayer 5.8.1
macos

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

Middleware

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

next start (local)

Additional context

The problem disappears when removing the middleware

Related issue on Intlayer side : https://github.com/aymericzip/intlayer/issues/265

Intlayer Middleware code: https://github.com/aymericzip/intlayer/blob/main/packages/next-intlayer/src/middleware/intlayerMiddleware.ts

The problem is related to the application, as there is no problem with this template

extent analysis

TL;DR

The issue with failing to import static assets can likely be resolved by modifying or disabling the Intlayer middleware, as indicated by the problem disappearing when the middleware is removed.

Guidance

Example

No specific code example can be provided without further details, but reviewing the intlayerMiddleware.ts file may offer insights into how the middleware handles static assets.

Notes

The issue seems to be specific to the combination of Next.js version 15.5.3 and Intlayer version 5.8.1, and it may not affect other versions or configurations.

Recommendation

Apply workaround: Temporarily disable the Intlayer middleware to resolve the static asset import issue, as the problem disappears when the middleware is removed, and there's an open related issue on Intlayer's side that may indicate a known problem.

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 error importing statics assets when `next build --turbopack` + middleware [2 comments, 3 participants]