Node.js hosting on cloudways just not winning with getting site live

I am using Cloudways for hosting on a Digital ocean server.

Published my app to public_html folder and changed .htaccess file to redirect correctly with the following config:

RewriteEngine On RewriteBase / RewriteRule ^(.*)?$ http://127.0.0.1:3000/$1 [P,L]

Getting the following error when running node index.js file:

module.js:478 throw err; ^

Please help

Have you executed an npm install on your server?

according to the cloudways engineers it is not necessary, but because I am clueless when it comes to node.js hosting I believe anything.

I presume I will have to do that using ssh?

Thanks @George

I could use their online ssh client and browsed to the public_html folder, then typed npm install and then published again, but still got error on page.

Will try again over the weekend.