2

I created a simple nextjs app using create-next-app I added only some pages in pages folder (contact.js, help.js)

I can build and start app in localhost using below commands

npm run build
npm run start

this is script part of package.json

"scripts": {
"dev": "node server.js",
"build": "cross-env next build",
"start": "cross-env NODE_ENV=production node server.js",
"lint": "next lint"

},

I deployed this app on a shared host with plesk control panel index page is ok, but it not found help and contact pages neither by typing url directly in address bar, nor clicking in Link (next/link)

.next folder content:

enter image description here

.next/server folder content:

enter image description here

.next/server/pages folder content:

enter image description here

at first I set Application Startup File to

node_modules/.bin/next

and tried run start script but it didn't work, so to start app I set Application Startup File to: customserver.js in plesk like below: enter image description here

Custom Server

what can be wrong here? any ideas?

0 Answers0