Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't open Cypress

  1. I install node js and visual studio code , Create a folder and open cmd
  2. Input npm init
  3. Input npm install cypress and wait to complete
  4. I open Visual studio code and run command: " ./node_modules/.bin/cypress open " But nothing is happened. Cypress can't open. I tried with other way as use : npm run cypress:open but it's not open too.

I run on Window 10, node js 8.12, visual studio code ver 1.27.2 In other PC which cypress worked normally with Windows PowerShell in terminal but in error PC it only run with cmd.

like image 790
Hthien Avatar asked Dec 02 '22 10:12

Hthien


1 Answers

Use \ instead of / in path for Windows:

.\node_modules\.bin\cypress open

In order to run cypress by this comand npm run cypress:open you need to add "cypress:open": "cypress open" to the scripts field in your package.json file:

{
  "scripts": {
    "cypress:open": "cypress open"
  }
}
like image 53
Vadim Yangunaev Avatar answered Dec 04 '22 06:12

Vadim Yangunaev