Deploy nodejs app doesn'nt work

After following this tutorial i get this error:

**Request Timeout**

This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

Server logs:

[LocalWorker::workerExec] Config[Node:spadomain.com:/]: suExec uid 65534 gid 65534 cmd /usr/bin/node /usr/local/lsws/fcgi-bin/lsnode.js, final uid 65534 gid 65534, flags: 0.
#spadomain.com] Connection idle time too long: 301 while in state: 6 watching for event: 270336, close!
#spadomain.com] HttpExtConnector state: 8, request body sent: 0, response body size: -2, response body sent:0, left in buffer: 0, attempts: 0.
#spadomain.com] Proxy connection state: 2, watching event: 25, Request header:673, body:0, sent:0, Response header: 0, total: 0 bytes received in 301 seconds,Total processing time: 301.

I have tried the following:

  • Restarting server once
  • Using PM2 to set it up
Version: Current Version:  2.3 
Build:  2
Current Commit: d617e48d37b9f7bb65ffa6a23547bd8a9a99853e
Latest Version:  2.3
Latest Build:  2
Latest Commit: d617e48d37b9f7bb65ffa6a23547bd8a9a99853e

After really messing around with all the options i could take there should be a caveat that: Do not install your own opinionated nodejs version when setting it up for the first time

  1. I updated cyberpanel to latest commit
  2. I installed nodejs as instructed here
  3. I setup my app
  4. Used the n module to upgrade node with a chance for me to fallback to old node
sudo npm cache clean -f
sudo npm install -g n
sudo n latest
sudo apt-get install --reinstall nodejs
sudo reboot

Using latest node v18.7.0 that i have tested with Express.js server and served a simple reactjs spa

I have followed the examples before but i haven’t seen where they show us how to deploy react application from our files

Welcome @Victormomanyi, Happy to have you here

single-page React applications can be deployed using NodeJS and Express.js NodeJS framework. First install the Nodejs as per my instructions on this post.

Secondly, follow the instructions here. Finally Setup AppServer Context to Serve Express.js Application

If you get any issues raise a question here.