I tried hosting my Next js app on Plesk, but after Following this Tutorial https://dev.to/optimbro/how-to-setup-nextjs-application-on-plesk-hosting-control-panel-linux-3d54 and trying a bunch of shit myself i either get nothing happening on start -> Page just keeps endlessly loading or i get the error "Cannot find module '../build/output/log'" when i use the last step of modifying the standard command from dev to start. up to This point the build works and everything
Asked
Active
Viewed 606 times
1 Answers
1
I took some time finding out what works and what does not work in plesk.
What I've found out:
I do not recommend the UI for anything other than starting the App. My steps for a successful launch are:
- Set Environment as shown in the tutorial https://dev.to/optimbro/how-to-setup-nextjs-application-on-plesk-hosting-control-panel-linux-3d54
- connect via SSH
- navigate to directory where git files are
- select desired Node environment
- run
npm run build
- edit the
node_modules/.bin/next
You will see a defaultCommand in line 45 asdev
change that tostart
using vim or some other editor don't use Plesk file manager - then you can go to the node UI in plesk and press restart

Luca Schönherr
- 11
- 1
- 4