-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cypress was unable to save these commands to your spec file: ENOENT: no such file or directory, open .... #16255
Comments
I don't think that we read the package name in from the package.json. We will interpret the name of the directory that the cypress.json is within as the 'root' of the project, so that may be what you're seeing there. Can you show the folder structure like below? I'm having some difficulty recreating and that would be helpful.
|
"We will interpret the name of the directory that the cypress.json is within as the 'root' of the project" --> that is consistent with what I am seeing. I am using a monorepo. root
|
Hi @jennifer-shehane , I have figured out a temporary get around, but seeing that In plugins/index.ts, add: Looking at how |
This actually turned out to be a pretty weird issue - our source map utils were not generating the correct path to the file. This issue was caused by the way source-map returns a relative file path, it would truncate the (This issue doesn't just affect Studio, it also prevents the "open in IDE" button from working for specific hooks like |
The code for this is done in cypress-io/cypress#16533, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
When I "Save Commands" using Cypress Studio, I get the following error:
Desired behavior
I expect the tests to be saved to the file for which I have ran Cypress Studio on to generate the commands.
The path should not have the package name from the package.json file. Instead, it should be:
'[ABSOLUTE PATH TO THE FOLDER I AM RUNNING THE TEST]/[RELATIVE PATH TO TEST FILE]'
For RELATIVE PATH TO TEST FILE, I had expected it to be derived from the
cypress.json
file fromtestFiles
or integration Folder:Curiously, when I click the "open in IDE" button on hover over the file path on the top left, it does open to the correct file path (not the '[ABSOLUTE PATH TO THE FOLDER I AM RUNNING THE TEST]/[PACKAGE NAME from PACKAGE.JSON]/[RELATIVE PATH TO TEST FILE]' version) in the Finder.
Versions
7.2.0 (Latest Version)
The text was updated successfully, but these errors were encountered: