• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue How do i activate/offer additional nodejs versions?

Bny

New Pleskian
Hi there,

I tried the past days to add another nodeJS version and get control of it through the nodeJS manager extension, unfortunately with no luck.

Instead of installing the nodeJS version system wide, I've placed it next to the other pre installed nodeJS versions (/opt/plesk/node/<node version>) which came along with the plesk 17 update. After hiting refresh on the nodeJS manager GUI – there was no new nodeJS version I've just uploaded.

So I took a deeper look into the "nodeJS manager extension", trying to figure out how this extension knows about the pre installed versions and got some findings.

First way:
1. It crawls through the files within "/etc/psa/node_versions.d" to register the nodeJS versions
2. If you remove the files or modify it's content so the nodeJS path doesn't match anymore, it will deregister the versions (as expected)
3. Viceversa if you create a new file or modify the content so it's pointing to the nodeJS version (opt/plesk/node/<version>/bin/node), it's all good as long as you point only to the pre-installed versions. The additional nodeJS versions doesn't get registered for some reason.


Second way:
1. It loads "/var/lib/plesk/node_versions.json" (if exists) and registers the given nodeJS versions
2. To confirm it's behaviour I've renamed the pre-installed nodeJS version folder in (opt/plesk/node) - all good the nodeJS versions were gone (as expected)
3. Now I've created the file "node_versions.json" (as it wasn't there by default) and pointed to all nodeJS versions which exist in "opt/plesk/node", it worked partially as in the "First way" it registered only the pre-installed nodeJS versions instead additionally mine which I'm trying to add.


I hope you guys can help me with this issue. I'm trying to run my meteorJS app which requires nodeJS 4.4.7.
I know there are other approaches around to get this done but since plesk offers nodeJS support I would like to use it, even for future projects where I might require different versions of nodeJS.

btw. I've tried it with the pre-builts from nodeJS.org
https://nodejs.org/en/download/releases/

p.S.: I've adapted all files of the downloaded nodeJS pre-built which used "#!/env" to "#!/opt/plesk/node/<nodejs version>/bin/node" (were only the npm/node_modules ones) to avoid any issue which might come up (just notices that change within the pre-installed versions).

Best Regards
Ben
 
Last edited:
  • Like
Reactions: JAE
Back
Top