How to solve the error "'cypress' is not recognized as an internal or external command, operable program or batch file."

Viewed 18456

I have updated the cypress version from 3.1.3 to 3.1.4 and after that when ever I am running the npm run cypress:open command, it is throwing error "'cypress' is not recognized as an internal or external command,operable program or batch file.npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! xxxxx@1.0.0 cypress:open: cypress open --env aaa=test npm ERR! Exit status 1"

Any advice, how to solve this issue?

2 Answers

You need to be running:

npx cypress open

to open it.

if you installed cypress locally in your project, you need to run your command from node_modules/.bin, for example ./node_modules/.bin/cypress run if you want to run cypress run or just run npx cypress run that just do the same

Related