Comments (7)
Which operating system are you using?
Which version of Node.js?
Which browser are you using?
Did you start the server with npm start
?
Can you access http://localhost:8080 manually in a browser?
Did you start the test with npm run cy:open
?
I checked it locally on Windows 11 with Node.js 18 and it worked for me.
from cypress-example-kitchensink.
thank you that worked for me now.
It's good to hear that your issue is now solved.
I'm not sure why my modified cypress config file was causing the 404 issue though?
I don't say that your modified config file caused the issue. It was just a sign for me that you had modified the example repository. Perhaps you also installed other software which deleted the file app/todo.html?
do I have to run the above 2 commands each time I launch cypress or can I just type: npx cypress open?
npm install
is necessary after the initial cloning and if you fetch an upstream update from this repository.
npx cypress open
only starts cypress. It does not start the server. That is why there is a script defined which you can call through npm run local:open
which starts the server and Cypress.
The README: Help and Testing says:
If you get stuck, here is more help:
You may also want to look at Cypress training courses to learn about more in-depth topics.
I suggest now to close this issue.
from cypress-example-kitchensink.
Thank you @MikeMcC399 for all your help. The todo.html file is intact inside the app folder, never touched. Will have to do more research as to why I was getting the 400 error.
from cypress-example-kitchensink.
Which operating system are you using? Which version of Node.js? Which browser are you using?
Did you start the server with
npm start
? Can you access http://localhost:8080 manually in a browser? Did you start the test withnpm run cy:open
?I checked it locally on Windows 11 with Node.js 18 and it worked for me.
I'm using windows 11.
node version is 19.8.1
I tried both electron and chrome and now getting a 404 instead.
when I go to http://localhost:8080 it takes me to the below page.
when I try to launch the todo.cy.js now I get a 404 error below.
I added cy.visit('http://localhost:8080/todo', {failOnStatusCode: false}) inside the todo.cy.js and now it runs but it doesn't seem to be able to GET the api end point, screenshot below.
Here's my cypress config file as well:
from cypress-example-kitchensink.
@eabusharkh77 Can you try running with node 18?
from cypress-example-kitchensink.
It seems that you have modified the example and now it is not working. I suggest you make a fresh clone and then you only execute the commands:
npm install
npm run local:open
It should work then. Normally Node.js LTS (currently 18.15.0) is the better choice, but the example does also work with 19.8.1.
For comparison, the file you showed a screenshot of is looking like this in the repository:
cypress-example-kitchensink/cypress.config.js
Lines 1 to 4 in 075d90d
from cypress-example-kitchensink.
It seems that you have modified the example and now it is not working. I suggest you make a fresh clone and then you only execute the commands:
npm install npm run local:open
It should work then. Normally Node.js LTS (currently 18.15.0) is the better choice, but the example does also work with 19.8.1.
For comparison, the file you showed a screenshot of is looking like this in the repository:
cypress-example-kitchensink/cypress.config.js
Lines 1 to 4 in 075d90d
@MikeMcC399 thank you that worked for me now, I'm not sure why my modified cypress config file was causing the 404 issue though? do I have to run the above 2 commands each time I launch cypress or can I just type: npx cypress open?
from cypress-example-kitchensink.
Related Issues (20)
- example tests fail current recommended mocha lint HOT 4
- Azure DevOps CI stopped on April 3, 2023 HOT 3
- Parallel workflow fails HOT 2
- Several advanced examples fail cypress/unsafe-to-chain-command lint rule HOT 11
- Azure Pipelines example uses non-recommended code HOT 2
- GitHub Topics update HOT 4
- Outdated Heroku CI example HOT 4
- package.json `engines` lists Node.js 14 in end-of-life status HOT 5
- Installation deprecations caused by netlify-plugin-cypress HOT 2
- CircleCI checksum failure installing GoogleChrome in Windows with Chocolatey HOT 3
- CircleCI runs Windows tests under unsupported Node.js 14 - renovate fails HOT 5
- CircleCI wrong Node.js used for `linux-build` (v16.16.0) and `mac-build` (v18.16.0) HOT 1
- element selector: ":last" vs ":last-child" HOT 4
- IDE Shows false errors regards codebase under Ventura MacOS HOT 3
- Missing API commands HOT 3
- CircleCI fails to install the ChromeDriver HOT 1
- Update HTML examples to conform to scaffolded tests HOT 10
- `cy.end()` test is inactive HOT 1
- GHA recording workflows fail in fork on push event
- GHA admin workflows fail in fork on pull_request event
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-example-kitchensink.