I cannot deploy simple nextjs app

I cannot deploy simple nextjs app always send me PM2 Error
I tried everything in docs and guides

Hello @ranaharoon3222, welcome to the Cleavr forum!

I took a look at your web app settings and updated the PM2 config (in web app > settings > build) to start on port 3000. Next hardcodes the port to 3000 unless you make an adjustment to the code. This seemed to do the trick.

I’ll review our docs/guides and see if I can make that more clear in case others run into a similar issues. :slightly_smiling_face:

This one I fixed but on the deployment stage I am facing this error
“Link ENV 20230211031647189
ln: failed to create symbolic link ‘/home/cleavr/afrimineslogisticslimited.co.zm/releases/20230211031647189/Afrimines-logistics-limited/.env’: No such file or directory”

How can I fix it?

There should be a .env file that it is trying to link. Did you delete the ,env file by any chance. In any case, you can just create an empty .env file in the project root and see if that solves your issue.

Hello @zayumba,

I created a NextJS application recently and everything was working as expected. Can you create a Next App again and let us know if the issue persists so that we can dig into the issue and help you.