Has anyone faced Error read EINVAL when deploying NextJs to CPanel?

I'm trying to deploy NextJs application to CPanel, followed official documentation on creating a custom server, getting Error read EINVAL code in logs.
12 Replies
Lopen
Lopen2y ago
I have deployed mine without any errors though Can you send link to the official doc you used Didn't see such during my time
Yiaoma
YiaomaOP2y ago
Lopen
Lopen2y ago
I am lost I think you miss interpreted the doc though Are you deploying next js as an api endpoint?
Yiaoma
YiaomaOP2y ago
Yes I'm using some api endpoint in my project if thats what youre asking The thing is, I have trying deploying on two difference serves, the one withoud CloudLinux it runs fine through application manager, on the other one throught setup NodeJs app it gives me this error
Lopen
Lopen2y ago
I still don't understand I haven't deployed a next js based api before
Yiaoma
YiaomaOP2y ago
I'm still trying to figure out whats wrong, thank you anyway!
Lopen
Lopen2y ago
But i feel the proper way is run npm run build Then push the .next app to your server Then on your server use ngix And do the configuration etc Then install pm2 and configure youe npm run serve in the pm2 way Or if you don't want pm2 Install tmux and byoyu And run npm run serve
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Yiaoma
YiaomaOP2y ago
Unfortunately I did not have a full access to the server and couldn't use ssh either, we moved to a different hosting and application runs perfectly now, thank you everyone for your feedback
Lopen
Lopen2y ago
where are you hosting? and what type of hosting? cpanel ?
Yiaoma
YiaomaOP2y ago
Yes cpanel, the one that didn't work properly is a2hosting
Lopen
Lopen2y ago
Good Search for terminal on your cpanel If they is one then i think your problem could be solved
Want results from more Discord servers?
Add your server