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
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: