https://cypress.io logo
Setting Cypress up on a new WSL Ubuntu device. Num...
# i-need-help
f
Hey folks, I'm having a heck of a time. I've been using Cypress locally on my MacBook for some time and it's been going great. Lately my device has been having trouble, so I set up WSL on my PC so I could have a backup in case the worst were to happen. We use yarn to handle dependencies, and I used NPM to install Cypress and Yarn. Originally everything I was installing was going into a mounted virtual drive, where nothing was working. I eventually got it running off the linux directory, and Yarn and the dependencies installed fine. I also was able to install Cypress@9.5.4, which is the current version I'm using. Every time I try to run Cypress headed or headless, I'm being met with the following:
Copy code
No version of Cypress is installed in: /home/workterminal/.cache/Cypress/9.5.4/Cypress

Please reinstall Cypress by running: cypress install

----------

Cypress executable not found at: /home/workterminal/.cache/Cypress/9.5.4/Cypress/Cypress

----------
A couple coworkers took a stab at it, and this is as far as we could get before I decided to reach out for help here. We got me off the mounted virtual drive, we got NPM and Yarn installed properly after using the linux directory, and then reinstalled Cypress using
yarn add cypress@9.5.4
, which completed successfully. We've tried expanding $PATH to include everywhere where Cypress exists, but it always looks in
.cache
. What can I do to toubleshoot further?
e
For the install did you use
npm install -g cypress
?
f
@echoing-tent-95037 I used
npm install cypress@9.5.4
, I did not use
-g
, I'll try installing it with global mode
Same issue, no change
e
Since you already checked path for the env, the only other thing I can think of is uninstalling cypress completely and then trying again with global, unless you already have.
f
I will try that route, appreciated 🙏
m
I'm running into a similar issue. Windows 11, WSL2/Ubuntu 20.04 It was working fine for a long time, in this environment, and then it suddenly stopped working. I re-built my environment from scratch, using the same specs, same codebase, same env files, etc..., and I'm seeing the same behavior. I run yarn test:e2e (our script command for running cypress open), and I get the following error message: It looks like this is your first time using Cypress: 9.5.1
Copy code
Cypress failed to start.

This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies

Please refer to the error below for more details.

----------

Command was killed with SIGILL (Invalid machine instruction): /home/socratesone/.cache/Cypress/9.5.1/Cypress/Cypress --no-sandbox --smoke-test --ping=712

----------

Platform: linux-x64 (Ubuntu - 22.04)
Cypress Version: 9.5.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Two of my colleagues have a nearly identical environment, and are able to run cypress tests without issue.
I run cypress with verbose debug logging enabled, and this is the point where it fails:
Copy code
2023-04-10T15:19:47.410Z cypress:server:cypress from argv [ '/home/username/.cache/Cypress/9.5.1/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=213' ] got options { _: [ '/home/username/.cache/Cypress/9.5.1/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 213, invokedFromCli: false, cwd: '/home/username/projectname', testingType: 'e2e', config: {}, pong: 213 }
    at makeError (/home/username/projectname/node_modules/cypress/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/home/username/projectname/node_modules/cypress/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  shortMessage: 'Command was killed with SIGILL (Invalid machine instruction): ...[there's more, but discord doesn't allow for long texts]
I just checked the verbose log of my coworker's cypress run and found that he is NOT running the command with the "--smoke-test" and "--ping=213" args. However, I don't see where I can alter this. Is there a setting where I can turn off the smoke-test and ping flags?
2 Views