Replies: 1 comment
|
It seems that this check isn't cheap. My "next build" earlier ran for ~7 minutes and consumed a huge amount of memory (several GB). Just ran the same in a Docker build on the same machine (which doesn't mount the data directoy) and it finished within 44 seconds. I had already tried to set my env variable to a non-existent path and renamed the directory, but the build still found the same number of files, so apparently it's a really broad check. |
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.
Summary
This is basically like #85366, which was closed, but still occurs to me on Next.js 16.1.3 with App Router.
In our app, we have a directory for uploaded files which gets mounted into the Docker container. We refer to it in several places like this (:
During build with Turbopack, it says things like:
I'm not sure if this is a bug, as I don't even understand what the build is trying to do here. That code is e.g. from an API route which sends the requested file to the browser. Is the build trying to check on all potential files delivered there? Does it try to bundle them??? I don't want and need that, I just want that code to execute at runtime (and maybe for those files which are fetched in static pages... but we have none of those).
So the question is really what the build is trying to do there, and if I can opt out of it for all my path operations. If it turns out to be a bug, I'm happy to open a new issue.
Additional information
No response
Example
No response
All reactions