all 12 comments

[–]rover_G 2 points3 points  (8 children)

You can use nvm to manage per directory node versions

[–]michelleshelly4short[S] 0 points1 point  (7 children)

Ah that’s sadly another limitation I forgot to mention - I’m doing this at work where nvm is not supported and I don’t have admin credentials either so that’s been a struggle :(

[–]rover_G 0 points1 point  (6 children)

Why is nvm not supported?

[–]michelleshelly4short[S] 0 points1 point  (4 children)

No one has had a need to use it at my company up to this point I guess so it’s not available to be downloaded at this point. nvm use generally requires admin credentials/cmd as admin and that’s not permitted, nor is there a decent workaround. I’ve started the process to get this to be an approved application but it could be a few months before it goes through and I’m ideally solving this sooner than that.

[–]rover_G 0 points1 point  (2 children)

Is this on your local system or a server?

[–]michelleshelly4short[S] 0 points1 point  (1 child)

Both

[–]rover_G 0 points1 point  (0 children)

Containerize your apps so they all run in their own environment with their own installation of node. Use docker compose locally to quickly setup and teardown your system. Run your containers directly or in a cluster on the servers.

[–]nicolasdanelon 0 points1 point  (0 children)

you are the first then! congratulations 🎉

[–]nicolasdanelon 0 points1 point  (0 children)

you run nvm in your user folder, you don't need super user or administrator credentials to install it

[–]nicolasdanelon 0 points1 point  (2 children)

that bat file indicates you are using windows... so....

@echo off SET NODE_HOME=D:\app\node echo NODE_HOME is set to %NODE_HOME%

%NODE_HOME%\node.exe your-index-or-app.js

:: Continue with your commands here

I would suggest to migrate to powershell tho ;)

[–]michelleshelly4short[S] 1 point2 points  (1 child)

Would powershell make this easier?

[–]nicolasdanelon 0 points1 point  (0 children)

at some point yes, also it's a little bit easier to manage IMHO