Spectrum is now read-only. Learn more about the decision in our official announcement.


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


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

March 29, 2019 at 3:32am
The Next.js community has a new home. This thread is preserved for historical purposes. The content of this conversation may be innaccurrate or out of date. Go to new community home →

/_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.

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?

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.
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

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

August 22, 2019 at 12:37am

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

September 2, 2019 at 10:55am
Did you solved this problems?

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

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

September 18, 2019 at 9:53am
Still doesn't solve my problem

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

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

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

December 13, 2019 at 10:52am
can help check why js file is 404
can help check why js file is 404
like this Router.push('/ slot?Type=123') Only then will this kind of error occur only rooter no have query is work
this is secondary directory
Is it a problem of route mapping?
Show more messages