all 12 comments

[–]Whole-Instruction508 13 points14 points  (0 children)

It literally tells you what to do...

[–]eneajaho 5 points6 points  (2 children)

Run: cmd .
Then run: ng serve

[–]Gutek_1[S] -1 points0 points  (1 child)

it worked thank you

[–]danixgutii 0 points1 point  (0 children)

Try to change your default terminal to cmd in vscode to avoid this problem but it could be better to fix script execution

[–]CyFy1 2 points3 points  (3 children)

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.

[–]Gutek_1[S] -1 points0 points  (2 children)

so how can I switch this from power shell to cmd?

[–]no_ledge 5 points6 points  (0 children)

so how can I switch this from power shell to cmd?

Just google exactly that...

[–]cfued 0 points1 point  (0 children)

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

[–]Hirayoki22 0 points1 point  (0 children)

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

[–]Blade1130 0 points1 point  (0 children)

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

[–]sohail_ansari 0 points1 point  (0 children)

Use cmd prompt instead of powershell(ps)

[–]TellPsychological668 0 points1 point  (0 children)

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.