Comments (4)
I can't reproduce your issue.
What happens if you execute the following using npx
?
npx cypress open --config viewportWidth=1280,viewportHeight=720
It looks like you may have Cypress installed globally in addition. It's recommended to install locally only:
npm install cypress --save-dev
from cypress.
It's good to hear that your problem is solved!
The command you need to run depends on which package manager you are using, so all the commands are listed without npx
, yarn
or pnpm
. This is explained in the documentation.
See Getting Started > Opening the App. If you are using npm, then you use npx
:
cypress open
You can open Cypress from your project root one of the following ways:
Using npx
npx cypress open
Or by using yarn
yarn run cypress open
After a moment, the Cypress Launchpad will open.
See also Guides > Command Line > How to run commands:
How to run commands
For brevity we've omitted the full path to the cypress executable in each command's documentation.
To run a command, you'll need to prefix each command in order to properly locate the cypress executable.
npx cypress run
...or by using Yarn...
yarn cypress run
from cypress.
Since this is not a Cypress bug, you should close this issue now.
The Cypress technical community on Discord welcomes new users
You can share your problems and get advice from other users there.
from cypress.
@MikeMcC399 , thanks for your response.
Excellent, that's how it works. I was following the Cypress documentation, it does not specify the npx parameter in the command. Maybe it's because you don't need npx to run the script in headless mode...
I'm new to Cypress, so I might end up saying nonsense.
I believe there may be an error in the documentation, the npx parameter must be added to the command line. When running the command requested in the documentation an error is thrown, but when adding npx it works successfully.
PS C:\Users\eu\Documents\Curso-TAT-Cypress-Basico> cypress run --browser chrome --config viewportWidth=1280,viewportHeight=720
DevTools listening on ws://127.0.0.1:54550/devtools/browser/5a0e387b-d3ee-46e0-ba08-a56ec59283eb
An invalid configuration value was set.
Expected viewportWidth to be a number.
Instead the value was: "1280 viewportHeight=720"
PS C:\Users\eu\Documents\Curso-TAT-Cypress-Basico> npx cypress run --browser chrome --config viewportWidth=1280,viewportHeight=720
DevTools listening on ws://127.0.0.1:54560/devtools/browser/ce29aa2a-d939-4081-b77c-c02976aebd5f
====================================================================================================
(Run Starting)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 13.6.3 │
│ Browser: Chrome 121 (headless) │
│ Node Version: v21.4.0 (C:\Program Files\nodejs\node.exe) │
│ Specs: 1 found (CAC-TAT.cy.js) │
│ Searched: cypress/e2e/**/*.cy.{js,jsx,ts,tsx} │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
from cypress.
Related Issues (20)
- Visible elements are "not visible" for Cypress HOT 2
- Enable devs to build managed & ergonomic env var access on top of Cypress, by surfacing the built-in environment resolution logic in node HOT 1
- cypress run (v13.6.5 and v13.6.6) hangs on Docker (M2 Mac) using --platform=linux/amd64 HOT 2
- cypress-grep throws error when using cypress with typescript.
- watchForFileChanges is not applied HOT 1
- Normal text in CI logfile is kind of unreadable HOT 8
- Cypress Tests Timing Out on Page Load. HOT 1
- 'have.text' assertion seems to be coming up with incorrect values. HOT 1
- @cypress/grep README refers to legacy filename cypress/support/index.js HOT 1
- Cypress test will hang when being recorded in Cypress Cloud HOT 4
- Add a clock on the cypress UI HOT 1
- Test Replay: [Shadow DOM] Support manual slotted elements.
- Investigate flaky Firefox screenshot test HOT 1
- download.cypress.io expired cert when response is cypress.zip HOT 16
- Integrity failed to find. Resource blocked only in Cypress. Source rewrite not helps
- Unable to Type in Test Name and Save the New Test in Cypress Studio HOT 1
- Edge Renderer Crash HOT 3
- cy.log will print & instead of & HOT 1
- Flaky test: Screenshot Timeout system test in Firefox
- Difficulty Typing in Cypress Tests for Custom Elements with Shadow DOM HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress.