Error while creating Angular Project " cannot be loaded because running scripts is disabled on this system."

Viewed 3376

I am new to Angular so please help me. I have installed node.js and angular cli, also downloaded visual studio code and set environment variable as well. Now trying to create first ever project in Angular but it is not working and instead showing this error "cannot be loaded because running scripts is disabled on this system." Kindly help me to rectify the error. Also, I refereed to the link given about-execution-policies but couldn't understand what exactly to do. enter image description here

UPDATE: I got answer to it. Just need to type

cmd

in the address bar of the folder where the project is and then open VS code using

code .

It will run. Thanks to all for giving inputs and helping me out. Kudos to all.

2 Answers
  1. Navigate to your project directory via VSCode terminal.
  2. Type this command & press Enter.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

VS Code use Powershell, so try to use Windows Terminal to create the Project or go to the path and delete the file ng.ps1 and tray it again.

Related