- Open PowerShell as Administrator:
Press Win + X, then click Windows Terminal (Admin) or PowerShell (Admin).
- Run the following command to allow script execution:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
If prompted, type A (Yes to All) and press Enter.
Try running npm -v again.