blackbaud / skyux2-docs

Documentation for SKY UX Components
4 stars 32 forks source link

Suggestion: Troubleshooting PowerShell Terminal #1035

Closed dougdomeny closed 3 years ago

dougdomeny commented 3 years ago

@skyux-team

Please consider adding the following (or similar instructions) to the bottom of the prerequisites page (https://developer.blackbaud.com/skyux/learn/get-started/prereqs) or other place as may be more appropriate.

<h4 class="sky-subsection-heading">Troubleshooting PowerShell Terminal</h4>

<p>
  Running any <sky-code>skyux</sky-code> command in PowerShell may result in the "skyux.ps1 cannot be loaded" error, as shown below.
</p>

<pre style="color: red; background-color: black; padding: 4px 0">
skyux : File C:\Program Files\nodejs\skyux.ps1 cannot be loaded. The file C:\Program Files\nodejs\skyux.ps1 is not
digitally signed. You cannot run this script on the current system. For more information about running scripts and
setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ skyux
+ ~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
</pre>

<p>To enable <sky-code>skyux</sky-code> commands in PowerShell, run the PowerShell <sky-code><a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.1#change-the-execution-policy">Set-ExecutionPolicy</a></sky-code> cmdlet:</p>

<sky-code-block>
  Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
</sky-code-block>
blackbaud-johnly commented 3 years ago

Thanks @dougdomeny. We discussed this in standup and opted to add a tip instead of a full section. I have a PR at https://github.com/blackbaud/skyux2-docs/pull/1036 that the team still needs to review.

blackbaud-johnly commented 3 years ago

Addressed in https://github.com/blackbaud/skyux2-docs/pull/1036.