Bug
I already have a working Cypress project and I upgraded to 0.20 by reinstalling it locally using yarn
$ yarn add -D cypress
Calling npm cypress:open (= ./node_modules/.bin/cypress open) gives the error that Cypress is not installed yet. I have to install Cypress manually by calling ./node_modules/.bin/cypress install.
I want cypress install to trigger automatically after adding with yarn so that it can be opened immediately.
Hmm, we use postinstall script to actually install the binary
Might be related to Yarn bug https://github.com/yarnpkg/yarn/issues/853
I had a problem with adding package to my project devDependencies by:
$ yarn add --dev cypress
which returned
_error Couldn't find package "@cypress/listr-verbose-renderer" on the "npm" registry._
In my case it has been solved with:
npm install cypress --save-dev
Hmm, that looks weird, why wouldn't it find cypress - what version of yarn are you using?
@bahmutov yarn v0.24.6
Can you take a look at https://github.com/cypress-io/cypress-test-node-versions ? We are testing Cypress against Node v8 and Yarn v1.0.1 successfully. This is the test run: https://circleci.com/gh/cypress-io/cypress-test-node-versions/139
Works with yarn 0.27.5 and node 6.11.1 without any issues for me
I yesterday upgraded Yarn to 1.0.2. I forgot what version I was using (0.24?). Will try again today!
I'm having the same issue.
Node: 8.6.0
Yarn: 1.1.0 (latest)
Installing via NPM is fine, but with yarn the node index.js --exec install fails
Output:
node_modules/cypress/node_modules/chalk/index.js:66
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
^
TypeError: Cannot read property 'close' of undefined
at Object.<anonymous> (node_modules/cypress/node_modules/chalk/index.js:66:74)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
@tonydaly can you try [email protected] - I am testing your situation in https://github.com/cypress-io/cypress-test-node-versions/blob/master/circle.yml#L83 and it passes https://circleci.com/gh/cypress-io/cypress-test-node-versions/349
I'm having the same issue.
Node: 8.8.1
Yarn: 1.2.1
Cypress: 1.0.3
Steps to reproduce
yarn add cypress --devnode_modules/.bin/cypress openResult
Outputs message:
-Error-
The Cypress App could not be found.
Expected the app to be found here: /Applications/Cypress.app
To fix this do (one) of the following:
1. Reinstall Cypress with: cypress install
2. If Cypress is stored in another location, move it to the expected location
Doing the recommended cypress install yields:
You are trying to install the latest version of Cypress.
This CLI tool is deprecated and can no longer install versions of Cypress above 0.19.4.
For newer versions, please use the new cypress npm module.
See https://on.cypress.io/installing-cypress for details
Installation with npm 5.4.2 is successful and cypress open yields the expected result
@luhmann that error appears to be coming from our old CLI tools which have been deprecated / removed.
Please uninstall them with npm uninstall -g cypress-cli
There's no reason to ever use that package again.
@brian-mann That fixed it. Thx for the quick response!
Had similar issue, getting following error while running yarn install and having "cypress" dependency in package.json:
error Couldn't find package "@cypress/listr-verbose-renderer" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find package "@cypress/xvfb" on the "npm" registry.
The reason was that in yarn global config I had our company's registry as a default one. So, adding “@cypress:registry” “https://registry.npmjs.org/” to .yarnrc and to .npmrc solved the issue.
Most helpful comment
@luhmann that error appears to be coming from our old CLI tools which have been deprecated / removed.
Please uninstall them with
npm uninstall -g cypress-cliThere's no reason to ever use that package again.