1
jshint : File C:\Users\Balarka\AppData\Roaming\npm\jshint.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
+ jshint app.js
+ ~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
rioV8
  • 24,506
  • 3
  • 32
  • 49
  • As the error message states, see the PowerShell help topic `about_Execution_Policies` for more information (and it even provides a URL). – Bill_Stewart Nov 10 '20 at 15:18
  • Does this answer your question? [Visual studio code cmd error: Cannot be loaded because running scripts is disabled on this system](https://stackoverflow.com/questions/56199111/visual-studio-code-cmd-error-cannot-be-loaded-because-running-scripts-is-disabl) – MoishyS Sep 14 '21 at 17:53

2 Answers2

1

You can use:

Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope LocalMachine

or:

Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser

You should enter these commands as Administrator.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
  • I recommend you add some context as to what these commands do, especially what the 'Undefined' execution policy means. – Joery Sep 07 '21 at 16:30
  • Please provide additional details in your answer. As it's currently written, it's hard to understand your solution. – Community Sep 07 '21 at 16:31
0

There's an answer that was referenced here: https://stackoverflow.com/a/59244943/11518388

Alternatively, you could also edit the properties for Visual Studio Code (right-click on the shortcut, click properties) and force it to always run as an administrator.

enter image description here