CI Error: "Cannot find a definition for command named cypress/run"
See original GitHub issueHi, I’m having an odd issue when trying to use this orb. Here’s my config:
version: 2.1
orbs:
cypress: 'cypress-io/cypress@1'
jobs:
test:
docker:
- image: circleci/node:8-browsers
steps:
- checkout
- run:
name: Authenticate with npm registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
# Cache to enable faster future jobs
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
# Run unit tests
- run: npm run test
# Run integration tests
- cypress/run
workflows:
test_and_deploy:
jobs:
- test
With this config the build fails immediately with the error “Cannot find a definition for command named cypress/run”. I thought there was some sort of issue with the orb installation, but I can replace cypress/run
with cypress/install
and that command runs just fine. Any ideas? This feels like something painfully obvious but I’m not sure where to look next.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
cypress-io/cypress - Gitter
I want to use - cypress/run as a step and I keep getting # Cannot find a definition for command named cypress/run. 7...
Read more >Orbs - "Cannot find a definition for command named ..."
I'm getting the Cannot find a definition for command named ssh-deployment/deploy error. Does the second approach only work with “official” orbs?
Read more >Running Cypress through CircleCi - Stack Overflow
The solution was simple. All I had to do was move the install-command from cypress/install to cypress/run . - cypress/install - cypress/run: ...
Read more >Error Messages | Cypress Documentation
No tests found. This message means that Cypress was unable to find tests in the specified file. You'll likely get this message if...
Read more >Continuous Integration - cypress - w3resource
'''npm start & cypress run // You should not do this''' ... run: name: Install Dependencies command: npm ci - save_cache: key: ```v1-deps-{{ ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m still getting this issue when trying to define a series of commands within a job. So should the above example look like this since there is no “cypress/run” command?
yup, there is no “run” command in this Orb - there is “install”, but “run” is the name of the job.
Looking at your config file, you just need npmrc token, which you can do simpler by following this example: https://github.com/cypress-io/circleci-orb/blob/master/docs/examples.md#install-private-npm-modules