No JS or CSS while deploying a NextJS app

So I have been trying to deploy my website for the past 4 days and couldn’t manage to make it work. I finally found a way to deploy a NextJS website, migrating to vercel. I’m still reporting you the bugs I found so you can fix it.

At first I couldn’t even deploy my website. It didn’t have a publish repository anymore. You can go to your deploy settings to add one (.next for nextjs SSR projects). This is caused by a recent update, Netlify decided to change things without notifyng customers…

Now my website successfully deploys but i’m facing blank pages (with some HTML & no JS or CSS).
This happens when you server-side load a page. Plus, the problems occurs on any URL but the 404 / 500 (which have custom routing on NextJS framework). Lastly, when you land on the 404 / 500 page, you can successfully go back to any page and they will display JS & CSS.

So what did I try thinking that I was the problem ?

  • Changing the publish repository
  • Changing the netlify/next-plugin version (which leads to other bugs)
  • Clearing all caches
  • Rolling back to old commits that worked and … no longer ?
  • Contacting the support that didn’t provide sufficient help
  • Downloading my deployment folder and searching in files the problem
  • Migrating to Vercel to see if the problem came from Netfliy, and… guess what, it does.

It seems that the .html files built are lacking any sort of CSS & JS and is only bundling HTML.

Sorry for this kind of salty post. Sorry for my english. I hope it will help others who are facing this problem for days and can’t deploy their site. I hope Netlify will correct this quick.

Hey there, @_fd

Thanks for reaching out and letting us know, we are sorry to hear you encountered obstacles. I’ll share your feedback with our teams so that they are aware.

I see that you mention “contacting the support that didn’t provide sufficient help”. Could you share a little more about how and where you tried to reach us? If people are getting missed, that’s something we want to look at right away.

Thanks,
Hillary

Well I didn’t want to blame the support team, since they provided help anyway to fix the .next repository path. But they suggested to search on the forum / post on it (because of the free tier I currently have (which I totally understand) and the possible benefit of having this problem solved publicly).

1 Like

Hey there, @_fd

Thanks for taking the time to share those further details. We appreciate it! Like I said, I will share your feedback with our relevant teams at Netlify. If you have any additional thoughts just let me know.

Best,
Hillary