Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to start Cypress from VS Code Editor terminal #5457

Closed
hemssam opened this issue Oct 24, 2019 · 10 comments
Closed

Failure to start Cypress from VS Code Editor terminal #5457

hemssam opened this issue Oct 24, 2019 · 10 comments

Comments

@hemssam
Copy link

hemssam commented Oct 24, 2019

I am new to Cypress. I installed a newer version of node.js and installed cypress 3.4.1 version. Also installed Visual studio code editor and using the terminal tab on the code editor I am trying to open cypress using .\node_modules\.bin\cypress open i get the following error:

PS C:\Users\samh01\Cypress> .\node_modules\.bin\cypress open
It looks like this is your first time using Cypress: 3.4.1

 ×  Verifying Cypress can run C:\Users\samh01\AppData\Local\Cypress\Cache\3.4.1\Cypress
   → Cypress Version: 3.4.1
Cypress failed to start.

This is usually caused by a missing library or dependency.

The error below should indicate which dependency is missing.

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.

----------

spawn UNKNOWN

----------

Platform: win32 (10.0.17134)
Cypress Version: 3.4.1
PS C:\Users\samh01\Cypress> set NODE_OPTIONS=
PS C:\Users\samh01\Cypress> cypress run
cypress : The term 'cypress' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ cypress run
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (cypress:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
PS C:\Users\samh01\Cypress> .\node_modules\.bin\cypress run
It looks like this is your first time using Cypress: 3.4.1

 ×  Verifying Cypress can run C:\Users\samh01\AppData\Local\Cypress\Cache\3.4.1\Cypress
   → Cypress Version: 3.4.1
Cypress failed to start.

This is usually caused by a missing library or dependency.

The error below should indicate which dependency is missing.

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.

----------

spawn UNKNOWN

----------

Platform: win32 (10.0.17134)
Cypress Version: 3.4.1

I tried clearing the cache and unsetting the NODE_OPTIONS. Nothing works.

@jennifer-shehane jennifer-shehane changed the title Failure to start Cypress Failure to start Cypress from VS Code Editor terminal Oct 25, 2019
@jennifer-shehane
Copy link
Member

Hey @hemssam, can you try:

  1. Updating to our latest 3.5.0 release - see what happens when you run that.
  2. Running .\node_modules\.bin\cypress run in debug mode mode and print the entire set of logs here.

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Oct 25, 2019
@hemssam
Copy link
Author

hemssam commented Oct 25, 2019 via email

@suhasch12
Copy link

suhasch12 commented Dec 4, 2019

Hi,
I'm facing the same error code when I try to run on VS

 CategoryInfo          : ObjectNotFound: (.\node_modules\.bin\cypress:String) [], CommandNotFoundException

can anyone help me on this issue
many thanks, Suhas

@maxime-aubry
Copy link

I have the same bug

@jennifer-shehane
Copy link
Member

@hemssam It doesn't look like you attached any output. Can you provide the DEBUG output?

@RashmiKalpeshChauhan
Copy link

RashmiKalpeshChauhan commented Jun 23, 2020

I faced this problem many times.
The easiest way to fix this problem is-

  1. Delete Cache which u will get "AppData\Local\Cypress\Cache" of your machine.
  2. Delete node_modules from the project folder.
  3. Then again install cypress -npm install cypress

The problem is fixed now :)

@skumar31
Copy link

skumar31 commented Jul 8, 2020

Thanks Rashmi
It works fine.

@krishnasan99
Copy link

I Tried This Working Fine.

Open Windows PowerShell with Run as Administrator then run with below command.

Set-ExecutionPolicy RemoteSigned

Yes

Now go to VSCode. and run

node_modules/.bin/cypress open

Cypress Runs. you can see as Verified Cypress!

@cypress-bot cypress-bot bot added stage: awaiting response Potential fix was proposed; awaiting response and removed stage: needs information Not enough info to reproduce the issue labels Jul 20, 2020
@smithapatil14
Copy link

Thanks Rashmi, your solution worked for me.

@jennifer-shehane
Copy link
Member

Closing as resolved.

If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.

@jennifer-shehane jennifer-shehane removed the stage: awaiting response Potential fix was proposed; awaiting response label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants