cypress: Error "cannot be loaded because running scripts is disabled on this "

Hi, After installing 3.8.1 I am getting the following error when I run node_modules.bin\cypress open in terminal

node_modules\.bin\cypress : File D:\CypressAutomation\node_modules\.bin\cypress.ps1
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

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20

Most upvoted comments

I found the solution

I have faced the same problem

Solution : In Window:: Open Windows PowerShell Run Set-ExecutionPolicy RemoteSigned Type Yes Now Run run command ./node_modules/.bin/cypress run Test runner will work properly

If anyone still unable to resolve this issue with above conditions… You can use below command by opening Windows PowerShell by clicking on Run as Administrator Set-ExecutionPolicy Unrestricted and click on 'Y", Then problem will be resolved image

do not use “Run” word with the command You have to execute only “Run Set-ExecutionPolicy RemoteSigned” if you get error on running above command, Check instruction displaying in result I executed “Set-ExecutionPolicy -Scope CurrentUser” it will ask you set ExecutionPolicy, enter “RemoteSigned” & hit enter key then enter “Yes” or “Y” & hit enter key

Thanks @Kailash1980, The solution worked for me as well.