Turbopack Error: path length for file \nextjs-ecommerce-template-main\nextjs-ecommerce-template-main\.next\dev\server\chunks\ssr\_next-internal_server_app_(site)_(pages)_shop-with-sidebar_page_actions_3636f305.js.map exceeds max length of filesystem #95382
govardhanaraos
started this conversation in
Turbopack Error Report
Replies: 1 comment
-
|
Hi, @govardhanaraos This error is caused by hitting the filesystem path length limit (Windows MAX_PATH limitation), not a Turbopack-specific bug. Root causeOn Windows, file paths have a legacy maximum length (commonly ~260 characters unless long paths are enabled). Turbopack generates deeply nested build output paths in:
This combination can easily exceed the OS path limit, especially in projects with:
Why it happens specifically in TurbopackTurbopack generates highly descriptive hashed chunk names that preserve route context. When combined with Fix / Workarounds1. Enable Long Paths in Windows (recommended fix)Enable Win32 long path support:
OR registry: New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
2. Move project closer to root
Reduce base path length:
C:\dev\project (good)
C:\Users\YourName\Documents\very-long-folder-structure\project (bad)
3. Shorten project / route names
This directly reduces Turbopack-generated filenames:
shorten route segment names (e.g. shop-with-sidebar → shop)
avoid deeply nested route hierarchies where possible
4. Optional: disable source maps in dev (reduces file churn)
If acceptable: productionBrowserSourceMaps: false
** Conclusion
This is a deterministic OS-level limitation (Windows MAX_PATH), surfaced by Turbopack’s long SSR chunk naming strategy. It’s not a runtime bug but an environment constraint amplified by deeply nested App Router structures. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Turbopack version:
23c46498Next.js version:
0.0.0Error message:
Beta Was this translation helpful? Give feedback.
All reactions