I'm unable to execute Angular CLI
commands in Visual Studio Code terminal.
When I type ng --version
in the terminal, it is opening the ng file instead of executing the command.
Any idea of how to resolve the above issue?
I had the same error in Windows. what I did is I set Command Prompt as the default shell Instead of PowerShell (PowerShell is default) in the terminal window where you select a terminal instance
I got the following error message while executing ng serve from VSCode:
File C:\Users\\AppData\Roaming\npm\ng.ps1 cannot be loaded because running scripts is disabled on this system...
Solution:
I was able to solve the issue by running the following command in PowerShell:
set-executionpolicy remotesigned
Make sure to run PowerShell with admin privileges. More on this solution can be read here.
The effective solution is
It worked successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With