question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress open test runner cannot find cypress.json file

See original GitHub issue

Please make sure you have read the submission guidelines before posting an issue

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation (nx.dev) and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)

Expected Behavior

Cypress should recognize and find the e2e folder to be able to open the test runner ui or maybe have a built in nx e2e command that will open the open test runner

What it would look like: CypressTestRunner

The image aboves doesn’t run the e2e but allows us to choose which file to run

Current Behavior

Running yarn cypress run open cannot find the cypress.json in the e2e folder inside the apps/ directory.

Could not find a Cypress configuration file, exiting.

We looked but did not find a cypress.json file in this folder: /Users/qjimmy/Desktop/my-app

Instead it says it can’t find the cypress.json in the root of the monorepo.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Create an nx monorepo with React
  2. Try to run the cypress e2e test open runner (Should display a ui with the tests files to run)

Context

Please provide any relevant information about your setup:

  • Using Nx version 9.2.4
  • Current cypress set up was generated by the nx cli
  • Mac OS Catalina 10.15.3
  • Firefox Developer

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
hloughreycommented, May 19, 2020

@qjimmy - does running the following command give you the work flow your looking for?

nx e2e myApp-e2e --watch

0reactions
delaireccommented, Aug 11, 2022

I had the same issue after migrating cypress from v9.7.0 to v10.4.0

When I ran it outside of Nx, I got another message :

There is a cypress.json file at the path: C:\projects\mfe-ecom-poc\apps\cart-management-e2e

Cypress version 10.0.0 no longer supports cypress.json.

Please run cypress open to launch the migration tool to migrate to cypress.config.{js,ts,mjs,cjs}.

https://on.cypress.io/migration-guide


Process finished with exit code 1

– EDIT –

What to do :

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find a Cypress configuration file. We looked but did ...
We've tried upgrading cypress, using cypress-io/github-action@v3 , and running it headlessly. In one separate PR I even tried to downgrade to ...
Read more >
Configuration - Cypress Documentation
This guide is for Cypress 10 and the new JavaScript configuration file format. If you are on an older version of Cypress that...
Read more >
javascript - Could not find any tests to run. We looked but did ...
I guess you need to enter npx cypress open if you are running for first time. once the project is created then you...
Read more >
cypress-io/cypress - Gitter
I'm trying to run my Cypress tests inside a docker container, ... We looked but did not find a cypress.json file in this...
Read more >
Cypress - Configuration of JSON File - Tutorialspoint
The execution logs show that the baseUrl has been obtained from the cypress.json file and it is applicable to all tests within the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found