Duong Cong Chien
Duong Cong Chien

Reputation: 71

Build standalone nextjs project but get Error: Failed to load resource: the server responded with a status of 404 when running server.js

When i build standalone nextjs project I get file server.js and I try to running my server.js file and get this error

1

Upvotes: 7

Views: 6367

Answers (2)

Parsa Farahani
Parsa Farahani

Reputation: 11

consider that the file in your folder should be page.js or page.jsx. and of course yk that the url should be just the file name.

Upvotes: 1

nenadmarinkovic
nenadmarinkovic

Reputation: 19

Try deleting node_modules, .cache folder and package-lock.json and run npm install again.

Upvotes: 1

Related Questions