`next dev --turbo` get 404 for `.next/static/chunks/` because of specified `deploymentId` in `next.config.ts`
LouisCuvelier opened this issue · 0 comments
LouisCuvelier commented
Link to the code that reproduces this issue
https://github.com/Subrequest/nextjs-bug-report
To Reproduce
- Start the dev server
- Go to
http://localhost:3000
- See the page not loading stuff (like CSS)
- Go to
next.config.ts
, comment outdeploymentId
- Restart and server and go back to localhost
- Page is loading fine
You can try the same without --turbo
it will work with and without deploymentId
being set.
Current vs. Expected behavior
Setting deploymentId
in the next.config.ts
with Webpack is working. But as long as you're using --turbo
it leads to 404s.
const nextConfig: NextConfig = {
deploymentId: Date.now().toString(),
};
As, "Next.js will automatically mitigate most instances of version skew and automatically reload the application to retrieve new assets when detected." I'm not sure if it's really necessary to use deploymentId
for self-hosting. I'll get rid of that.
Also, deploymentId
is not mentioned in next.config.ts
's doc. It is only mentioned here. Maybe something to add ?
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.1.0: Thu Nov 14 18:15:21 PST 2024; root:xnu-11215.41.3~13/RELEASE_ARM64_T6041
Available memory (MB): 49152
Available CPU cores: 12
Binaries:
Node: 23.3.0
npm: 10.9.0
Yarn: N/A
pnpm: 9.14.4
Relevant Packages:
next: 15.1.0 // Latest available version is detected (15.1.0).
eslint-config-next: 15.1.0
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response