• 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.

Resolved Having problem running nodejs app on Plesk

AlbmaniaGroup

New Pleskian
Server operating system version
CentOS 7
Plesk version and microupdate number
18.0.48
First of all Merry Christams and hope you are enjoying the end of the year.
I am new on NodeJS and I have an app build in NodeJS. I have installed nodejs extension on plesk that came installed with phusion passenger server (never heard about it before). Now, I have deploied the software via GIT on the domain account, in a subdomain to be more precise, run the commands provided by documentation (composer install; some php artisa commands, npm run dev).Everything runs perfect with no errors, and when i try to load the page, it shows:

Code:
[ D 2022-12-25 21:42:37.1721 27069/T1 age/Spa/SpawnEnvSetupperMain.cpp:747 ]: shellName = 'bash' detected as supporting '-l': true
/var/www/vhosts/mydemo.com/front.mydemo.com/public/js/app.js:1
(self["webpackChunk"] = self["webpackChunk"] || []).push([["/js/app"],{
^

ReferenceError: self is not defined
    at Object.<anonymous> (/var/www/vhosts/mydemo.com/front.mydemo.com/public/js/app.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:80:25)
    at require (node:internal/modules/cjs/helpers:103:18)
    at loadApplication (/usr/share/passenger/helper-scripts/node-loader.js:243:2)
    at setupEnvironment (/usr/share/passenger/helper-scripts/node-loader.js:214:2)

On NodeJS extensions, settings looks like this
nodesjs-extension.jpg

I have to mention that the web app is working perfectly on localhost with the same settings but without Plesk. Also, have to mention that I have nGinx running as proxy.

Thank you
 
Hi, I am having the same problem here, after some investigation i found out that:
1. the error is generated from webpack compiler (angular ng build, in mycase)
2. dependency that still use the method self instead of this.

unfortunately, at this momenet, i am still struggling with this error, hopefully we'll find the way

You are not alone :p
 
Hi update of this error, we solve it by reading thru angular docs

here is the link, Angular

what we did:
- adding two files mentioned in the docs, .htaccess and index.html as self reference
- restart the node server

the result:
application works

hopefully it help you

Cheers
 
Hi update of this error, we solve it by reading thru angular docs

here is the link, Angular

what we did:
- adding two files mentioned in the docs, .htaccess and index.html as self reference
- restart the node server

the result:
application works

hopefully it help you

Cheers
Hello there.
Thank you for your updates. Unfortunately we are not using Angular but pure node for react web app, and still struggling with the issue :-(
Thanks anyway for your help. I will check out that documentation whith the hope that I may find any clue to progress.
 
For anyone that may have the same issue, I have resolved it by Disableing the Node Application from plesk ("Disable Node.js" button as on the image attached above). Somehow, when it is enabled, it crashes something, so I have run all the commands on the terminal and left Node.js from Plesk GUI disabled. Everything works perfectly now. Hope it will help anyone.
 
Back
Top