menu

Next.js

A place to chat about Next.js and answer questions. For all other ZEIT products, check this out.

Channels
Team

/_next/static/.../pages/***.js 404 Not Found.. build issue

March 29, 2019 at 3:32am

/_next/static/.../pages/***.js 404 Not Found.. build issue

March 29, 2019 at 3:32am
Deployed sample application, which is not working as excepted. Always showing 404 for all pages. it is regular node app deployment. Any one please help, Thanks!
Show previous messages

March 30, 2019 at 10:44am
To which service are you deploying your Next.js app? It should not be necessary to set distDir to _next. If the app works fine when you run next build and next start on your local machine, then it should work on the live server as well without making any extra changes to Next.js code.
  • reply
  • like

August 16, 2019 at 12:08am
I have exactly the same issue and it runs locally just fine and with Nginx and remote server same issue exactly... Could you please advise how did you solve it?
  • reply
  • like

August 16, 2019 at 6:44am
Did you run npm run build on the remote server? If the browser is showing you a 404 error for a specific file, check if that file exists in the filesystem.
  • reply
  • like
Yes, I have run the build process before running, I think it is a problem with serving the site static assets, I don't know how to fix it or where _next folder is located as it gives all errors from that folder
like-fill
2
  • reply
  • like

August 16, 2019 at 6:08pm
I have the same problem
  • reply
  • like

August 22, 2019 at 12:37am

August 28, 2019 at 10:52pm
I'm having the same issue
  • reply
  • like

September 2, 2019 at 10:55am
Yes, I have run the build process before running, I think it is a problem with serving the site static assets, I don't know how to fix it or where _next folder is located as it gives all errors from that folder
Did you solved this problems?
  • reply
  • like

September 17, 2019 at 6:29am
This doesn't work either. Does anybody know how to fix this?
  • reply
  • like

September 17, 2019 at 11:30pm
Hi all, I solved this problem by adding next.config.js Adding screenshot for reference.
  • reply
  • like
My problem was, next build is not generating the build_id, So generated run time build id, so solve the problem.
  • reply
  • like

September 18, 2019 at 9:53am
Hi all, I solved this problem by adding next.config.js Adding screenshot for reference.
Still doesn't solve my problem
  • reply
  • like

October 8, 2019 at 2:43pm
Does anybody know how to fix this?
  • reply
  • like

October 17, 2019 at 12:27pm
yes just mine fixed
  • reply
  • like
just follow above screen shoot
  • reply
  • like

November 23, 2019 at 12:31am
hi In my case the problem was an incorrect pathname, in the route.push.
  • reply
  • like