• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Problem to deploy Next App and Express API as a custom server

heppyAndriawan

New Pleskian
Server operating system version
Ubuntu 20.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.46
Hi everyone,

I am really new to Plesk, and I am trying to follow the steps from this link below but it seems still not working.


1. So first, I exported my Next app by typing npm run build, and after completing I convert everything including the .next folder but except the node module folder to a zip file.
2. after login into Plesk, I upload this file to File Manager in the directory "httpdocs/public/" as I read in the other articles that on Linux the node app only works properly from this directory, so then I create it.
3. After that I install the node extension and setup up the new app below:
*Node.js version: 18.12.0​
*package manager: npm​
*Document Root: "httpdocs/public/"​
*application mode: production​
*Application Root: "httpdocs/public/"​
*application launch file: server.js => ("This is an Express API / listening API router")​
*Custom Environment Variables: "some env variable to connect to a database like a host, database name, User name, password"​
4. Next step I press "Enable Node.js" to activate the app and install all dependencies by pressing “NPM install” then after all is installed then I click Application URL to check the website but I got this:

Screenshot 2022-10-31 at 10.10.31.png

if I click "Technical details" then it says I need to run the node app with the environment set to development and/or with the friendly error pages option set to "on" to see all the error details.

5. I change the application mode to development and then this shows up. I feel hopeless, and don't know what to do anymore.
Screenshot 2022-10-31 at 10.22.09.png



Can anyone help me, what should I do? I am completely new to this case, I am really open to suggestions to solve this problem.

Thanks in advance.
 
I can confirm this exact problem with a basic hello world Express app (Express "Hello World" example).

Another app suddenly stopped working (the code wasn’t touched, but Plesk installed automatic updates in the meantime). It can’t be started because of a timeout during the “Initialize language runtime” phase.

Something seems wrong with the latest combination of Plesk, the Phusion Passenger and Node.js?

@heppyAndriawan Did you find a solution?
 
Even better: there is an official example Node.js app provided by Plesk, which I found in this article. You can find the app’s repository here.

Trying this app shows the same result and doesn’t work:

Bildschirm­foto 2022-12-01 um 16.15.35.png


After some page refreshs it turns into this error:

Bildschirm­foto 2022-12-01 um 16.16.41.png
 
@heppyAndriawan Now that I looked at your problem again, it may be different from mine.

First thing I can point out with your setup is that the Application Root should not be the same directory as Document Root. You can put the app into the httpdocs directory (it doesn’t have to be httpdocs/public), but your app needs a child directory, that contains public files (the Document Root)—which is therefore usually named public.

Also, before running the app, you need to install its (production) dependencies by clicking NPM Install.
 
To follow up on this: my problem was solved by setting the system config DefaultTasksMax to a higher number. The default was 60, I changed it to 300 and the Node.js app immediately started to work again.
 
Back
Top