Saturday, July 3, 2021

PowerShell not allow to run nodejs install

Following installation of nodejs managed by nvm for windows, I cannot run the node and npm in the Windows PowerShell unless run the PowerShell using administration access.

The solution is found here. https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system answered Aug 30 '13 at 13:10 by Ralph Willgoss



For Windows 10, Windows 7, Windows 8, Windows Server 2008 R2 or Windows Server 2012, run the following commands as Administrator:
x86 (32 bit)
Open C:\Windows\SysWOW64\cmd.exe
Run the command powershell Set-ExecutionPolicy RemoteSigned
x64 (64 bit)
Open C:\Windows\system32\cmd.exe
Run the command powershell Set-ExecutionPolicy RemoteSigned


Now, node and npm can be run from the Windows PowerShell as normal user, no need administrator privileges.


NVM for windows installation is from here, https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows