PentiaLabs/generator-helix

Execution Policies add-project.ps1 cannot be loaded because running scripts is disabled on this system

jimmierindal opened this issue · 4 comments

External developer tells:

When I am adding a project to a solution through the helix generator, im met by this error

Error: C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-helix\powershell\add-project.ps1 : File C:\Users\xxx\AppData\Roaming\npm\node_modules\generator-helix\powersh
ell\add-project.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?Li

Error: nkID=135170.
At line:1 char:1

I would expect to be notified about whether or not i have to run the generator in a special execution policy state. Im not, and the script execution fails.

Could you try to run Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force in a Powershell with admin rights?

If this works this should be added to the readme.

In my opinion this is not a bug per se. It's probably in the category of an enhancement to docs.

Setting the execution policy helped as expected..
Agree, its not a bug, but It Just needs to be clearified whats the best way to deal with it..

I totally agree. We will make an instruction on this, and I appreciate your report on it. It's issues like this that can help us prepare the tool for broad user consumption 👍