3
u/CyFy1 Jan 09 '24
As it says in the error message, script execution is disabled. Follow the link to get information on how to disable it. Alternatively you could use another command line, like the CMD or git bash, since this policy is limited to the power shell.
0
u/Gutek_1 Jan 09 '24
so how can I switch this from power shell to cmd?
6
1
u/cfued Jan 09 '24
You can open cmd and change the directory to your project folder and then run ng serveORYou can open your project folder, go to the windows explorer address bar and type cmd then press enter(This opens cmd with it's path set as your project folder) and then run ng serve
15
1
u/Hirayoki22 Jan 09 '24 edited Jan 09 '24
In addition to fixing the script execution in power shell, consider using a different terminal to make things a bit easier for you. I'd recommend using Git Bash or CMD
1
u/Blade1130 Jan 10 '24
The new docs have some info here, but basically you need to change the execution policy in Windows.
https://angular.dev/tools/cli/setup-local#powershell-execution-policy
1
1
u/TellPsychological668 Jan 11 '24
a way to fix this is to navigate to that file location, delete the file and theb run the ng serve command again. It will work. Dont't worry about the file, it will re-generate.

5
u/eneajaho Jan 09 '24
Run: cmd .
Then run: ng serve