Search code examples
catalystbyzohozohocatalystcatalystserverless

I couldn't login Catalyst account through Catalyst CLI


I'm trying to log in to the Catalyst account through Catalyst CLI, but I'm facing a PSSecurity exception issue. I have already installed the Catalyst CLI. You can find the error message given below.

PS C: Users\Admin\Desktop\Java_platform> catalyst login

catalyst: File C:\Users\Admin\AppData\Roaming\npm\catalyst.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 + catalyst Login

  • CategoryInfo : SecurityError: (8) Ll, PSSecurityException
  • FullyQualifiedErrorId : UnauthorizedAccess

Solution

  • You might face this issue if your execution policy for ps1 files are restricted in your local machine. To resolve this issue, run the below command in your command prompt Administrator Mode and then run catalyst login command from the same terminal by navigating to your project directory.

    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
    

    Also, make sure you are installing Catalyst CLI in the Administrator Mode. You can find their help documentation here to install Catalyst CLI.