Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cannot be loaded because running scripts is disabled on this system — ANGULAR V14

When I have to run my Angular project or any ng command, the system shows the below error:

ng : File C:\Users\achra\AppData\Roaming\npm\ng.ps1 cannot be loaded
because running scripts is disabled on this system. For more
information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

  • ng v
  • ~~
    • CategoryInfo : SecurityError: (:) [], PSSecurityException
    • FullyQualifiedErrorId : UnauthorizedAccess

Any Solution… I’m new on Angular and i have just started to learn !

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Thanks for your attention. I’m looking forward to your answers.

>Solution :

First, you have to need to open the command prompt and run this command.

set-ExecutionPolicy RemoteSigned -Scope CurrentUser 

Now you have to run the second command on your system. This command is:

Get-ExecutionPolicy

When you have run this command your system has a show “RemoteSigned”. If you have received this message, then your problem will be solved. Now you have to go to the next step to view the list of policy which policy has been updated by the last commands.

To view their policy, you need to run this command in your command prompt:

Get-ExecutionPolicy -list  

When you run this command, a few policies are shown on your monitor screen.

Now you can see your system execution policy list. You have successfully solved your problem. Now you need to go to the command prompt and check that your problem is solved.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading