Thanks for the answer.
I have no problem installing NodeJS and running it under pm2 and always do this outside Virtualmin (especially as Nodejs install is not available as a script) that is easy. I also often have more than one Node version available.
I was specifically interested in the “weird differences in environments” thinking it might be specific to Svelte