synpress icon indicating copy to clipboard operation
synpress copied to clipboard

We looked but did not find a synpress.json file in this folder

Open ChrisChan888 opened this issue 2 years ago • 5 comments

This is my repo, https://github.com/ChrisChan888/try-synpress I did have synpress.json in the root folder, but after npx synpress run. This error comes out.

Could not find a Cypress configuration file.

We looked but did not find a synpress.json file in this folder: /.../try-cypress
Failed to run Cypress
Could not find Cypress test run results

ChrisChan888 avatar Jan 20 '23 09:01 ChrisChan888

I have the same issue. I of course double checked that the name is correct and located exactly in the folder where it says it didn't find it.

reasonmethis avatar Jan 26 '23 23:01 reasonmethis

I think this is due to synpress just throwing a default filesystem error from Cypress and not handling specifics

try:

npx cypress open --config-file=synpress.json

And it will give you more information about why it can't read the file. For me it was a bad json configuration

jlavasyou avatar Feb 02 '23 20:02 jlavasyou

With Cypress, it works fine and launches correctly "env-cmd -f .env npx cypress open --config-file=synpress.json --config supportFile='cypress/support/index.js'"

But when I try with Synpress it fails "env-cmd -f .env npx synpress run --config-file=synpress.json --config supportFile='cypress/support/index.js'" I get this error


We looked but did not find a synpress.json file in this folder: /Users/aerg/works/folder
[1]    60066 terminated  npm run test:e2e

Edit : Actually, I managed to make synpress launch with the following: "env-cmd -f .env npx synpress open --configFile=synpress.json"

Problem is, it doesn't seem to start with run, which is recommended per the Readme

ComradeAERGO avatar Feb 20 '23 10:02 ComradeAERGO

Did anyone figure this out? Im still stuck on this

Ed-Marcavage avatar Mar 31 '23 03:03 Ed-Marcavage

Yes, this is very annoying. The issue stems from an update on Cypress's end in which they move away from .json to .js for their configuration files. So if you change the extention and ensure it aligns with these specifications it should work. However, you'll run into other issues so the best thing to do is just not use a config file and configure everything to work with Synpress's default configuration.

defiled avatar Jun 30 '24 16:06 defiled