next.js
next.js copied to clipboard
Output export and distDir in the config file will crash the dev server (Ver 14.1)
Link to the code that reproduces this issue
https://github.com/leo-budgetsimple/nextjs-bug
To Reproduce
Copy over the repo
Start the application on dev (npm run dev)
Go to localhost:3000
You should see the text 'Hello'
but instead you get: missing required error components, refreshing...
Current vs. Expected behavior
Current Behavior:
Cannot run development server, this error appears on the screen:
missing required error components, refreshing...
Expected Behaviour
To be able to run the dev server.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12 18:54:30 UTC 2
Binaries:
Node: 18.19.0
npm: 10.2.3
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.1.1-canary.47 // Latest available version is detected (14.1.1-canary.47).
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: export
Which area(s) are affected? (Select all that apply)
Static HTML Export (output: "export")
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
This happened after I upgraded to NextJs 14.1.
Doesn't happen with old versions.
If I remove distDir the dev server works as intended, same as if I remove the output: export
Would love to have some feedback, I got the same problem on my frontend react strapi website
I have the same issue the dev server is looking for build/server/middleware-manifest.json
instead of .next/server/middleware-manifest.json
Any solution?
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
Closing as this is fixed in latest canary of Next.js, x-ref: https://github.com/vercel/next.js/issues/61105#issuecomment-1945172916
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.