Elixir beginner in vscode - Elixir\bin\mix.ps1 cannot be loaded error

installed Elixir late last night, and tryed to do some github koans from https://github.com/elixirkoans/elixir-koans.

when i started i was suposed to write mix deps.get in the terminal. got this error back:

mix : File C:\Program Files (x86)\Elixir\bin\mix.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at h
At line:1 char:1

  • mix deps.get
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess

im running everything on an Lenovo core i7 windows 10 laptop.

Try running from a different command line or terminal that might be allowed to do this. try nodejs command line if you have.

thnx for the help, Nodejs command line worked. But i still cant use mix deps.get in my vscode terminal… and im not sure how i can use elixir without it :confused:

In the error message you posted, there is a link to a MicroSoft support page. On that page is explained how you can set up PowerShell to run the script.

Alternatively you can use the cmd.exe terminal instead of PowerShell, as some upstream system administrator might not allow you to change PowerShells script policy.