Error: EPERM: operation not permitted, open \TestAutomation\cypress.json'

2.7k Views Asked by At

Trying to launch the Test Runner of Cypress first time through command - node_modules.bin\cypress open

But getting an unexpected error- Error: EPERM: operation not permitted, open \TestAutomation\cypress.json'

1

There are 1 best solutions below

5
On

You don't mention that much information, plus you misformatted some of it, so I can't really be precise in my answer.

However, I'd do:

  • check that cypress.json is valid
  • check that package.json is valid
  • add a new script to package.json:
{
  "scripts": {
    "open": "cypress open"
  }
}

and then run $ npm run open

  • clear npm cache: > npm cache clean --force
  • install latest version of npm as admin: > npm install -g npm@latest