[Angular] ng.ps1 cannot be loaded because running scripts is disabled on this system
My project was written by Angular version 8, daily I still run normal but today after running the command
ng serve -o I got an error as below:
ng : File C:\\Users\\QuizDev\\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 serve + ~~ + CategoryInfo : SecurityError: (:) , PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
Please suggest to me if you know any reason.
Sandeep Kumar Nov 16 2020
You can try to do as below:
ng.ps1file from the directory
C:/Users/QuizDev/AppData/Roaming/npm/ng.ps1then try clearing the npm cache at
I hope it works for you.
Marry Christ Nov 16 2020
I also get the same error, I resolved this issue by running the command below in cmd of root project Angular:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
I hope it's work for you.