I have no admin rights in my Windows PC, and the admin has already made a Node installation at C:\Program Files\nodejs
, but this is version 12:
PS C:\Users\JO52900> node -v
v12.18.3
PS C:\Users\JO52900> Get-Command node
CommandType Name Version Source
----------- ---- ------- ------
Application node.exe 12.18.3.0 C:\Program Files\nodejs\node.exe
I want now to update Node without admin rights, so I manually installed version 14 in C:\Users\JO52900\nodeJS\node-v14.18.0-win-x64
C:\Users\JO52900\nodeJS\node-v14.18.0-win-x64> .\node.exe -v
v14.18.0
Now I tried adding this folder to path:
$env:Path += "; C:\Users\JO52900\nodeJS\node-v14.18.0-win-x64"
but it does't work, Get-Command node
always returns C:\Program Files\nodejs\node.exe
.
TLDR: how can I override the default Node path, without admin rights, such that NPM and Powershell 'node' command use only the the new NodeJS folder which I have full access to (C:\Users\JO52900\nodeJS\node-v14.18.0-win-x64
)?