Next.js Discord

Discord Forum

Build static css returns 400 error

Unanswered
Peruvian anchoveta posted this in #help-forum
Open in Discord
Peruvian anchovetaOP
Hi,

first time NextJS developer here, I have put up a site and I noticed on the initial deployment everything worked as intended, after subsequent deployments where npm run build occured, I noticed that my styling was broken and file names differentiated between code and servver file name.

I feel this is more of a configuration question but can anyone provide any help please

2 Replies

Peruvian anchovetaOP
This is what the build process outputs
> next build

   ▲ Next.js 15.0.2

   Creating an optimized production build ...
 ✓ Compiled successfully
   Linting and checking validity of types ...
   Collecting page data ...
   Generating static pages (0/5) ...
   Generating static pages (1/5) 
   Generating static pages (2/5) 
   Generating static pages (3/5) 
 ✓ Generating static pages (5/5)
   Finalizing page optimization ...
   Collecting build traces ...

Route (app)                               Size     First Load JS
┌ ○ /                                     2.04 kB         102 kB
└ ○ /_not-found                           897 B           101 kB
+ First Load JS shared by all             99.7 kB
  ├ chunks/215-f08a849cdef224a8.js        45.2 kB
  ├ chunks/4bd1b696-f81f875480a39864.js   52.6 kB
  └ other shared chunks (total)           1.91 kB

Route (pages)                             Size     First Load JS
─ ƒ /api/checkout_sessions                0 B            92.3 kB
+ First Load JS shared by all             92.3 kB
  ├ chunks/framework-56c6fb34bb17b733.js  57.3 kB
  ├ chunks/main-3c10dcfcc43047a8.js       33.1 kB
  └ other shared chunks (total)           1.89 kB

○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand