Netlify Site Name:
https://deploy-preview-7335--web-next-staging.netlify.app/
Issue Description:
Static assets return 404 errors.
We are facing an issue where static assets (JS/CSS/media files) return 404 errors on my Next.js site deployed on Netlify. The assets are visible in the deploy file browser but are not being served correctly.
Custom Domain:
Not applicable in this case.
Full Build Log & Build Settings Screenshot:
Build Settings:
[build]
command = "corepack enable && corepack prepare pnpm@9.6.0 --activate && pnpm install && pnpm run build"
base = "apps/web-next"
publish = ".next"
ignore = "bash ./check-web-next-changes.sh"
[build.environment]
NODE_VERSION = "18"
PNPM_VERSION = "9.6.0"
[[redirects]]
from = "/*"
to = "/"
status = 200
[[headers]]
for = "/*"
[headers.values]
Content-Security-Policy = "frame-ancestors *"
[context.deploy-preview.environment]
REACT_APP_NETLIFY_CONTEXT="deploy-preview"
[context.deploy-preview.build]
ignore = "bash ./check-web-next-changes.sh"
[[plugins]]
package = "@netlify/plugin-nextjs"
next.config.js
We are using output: “standalone” in next.config
const nextConfig = {
output: 'standalone',
experimental: {
reactCompiler: true,
},
In deployment logs, files appears
.next/_next/static/media/
1490e087b7bb4966-s.p.woff2
69.4 KB
Download
46e43d6708c62346-s.p.woff2
68.6 KB
Download
794f065576579afd-s.p.woff2
70.6 KB
Download
8a4ccfed2a35fd2b-s.p.woff2
69.1 KB
Download
98f01d6466c808c9-s.p.woff2
72.1 KB
Download
c6b27bcef80d6b1a-s.p.woff2