Renaming the distDir and using "output: export" seems to render "npm run start" unusable #73051
Labels
bug
Issue was opened via the bug report template.
Developer Experience
Issues related to Next.js logs, Error overlay, etc.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/npm-run-start-broken-t9z2fd
To Reproduce
.next
andbuild
folders if present.npm run build
which runsnext build
.next
andbuild
folders are created successfully. Run the "prod" task; this runsnpm run start
which runsnext start
Current vs. Expected behavior
I am trying to test my production build locally. We are using static exports for our application and we have renamed the typical "out" folder to "build" in
next.config.mjs
. Everything builds successfully (and I have deployed it on production just fine), but runningnpm run start
(which is reallynext start
) cannot seem to find the production build.I get this error:
This is my
next.config.mjs
file:The
.next
folder seems to contain theBUILD_ID
but thebuild
folder, which contains all the static exports, does not have aBUILD_ID
and I think that is whatnpm run start
is looking for based on the URL the error message points to. Any suggestions on how to run the production build withnpm run start
?I understand my environment info below dictates things are out of date, but my codesandbox above should be using the latest NextJS and it still doesn't work there.
Provide environment information
Which area(s) are affected? (Select all that apply)
Developer Experience
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: