[Cypress] Error while trying to open cypress "cypress.ps1 cannot be loaded because running scripts is disabled on this system"
node_modules.bin\cypress open command is throwing the below error:
\node_modules\.bin\cypress.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
+ node_modules\.bin\cypress open
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
1 Answer
3 years ago by Jahaan
Try setting the execution policy as below. Below worked for me to solve the above issue
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
3 years ago by Meera