Skip to content

'ENOENT: no such file or directory, stat' when running .feature files for a specific branch or change #27077

@skapegoat

Description

@skapegoat

Current behavior

Whenever me or my co-worker modify something at our release branch, something very odd occurs: we start getting the "ENOENT: no such file or directory, stat" error.

Trying to give a better example:

  • They merged a new branch on release with a new .feature file
  • I update the release on my computer after they did so
  • I couldn't run this new .feature file, but could run any other .feature files I already had

By looking at the error message, it looks like cypress is not taking the right path when searching for the .feature files

Error: ENOENT: no such file or directory, stat '/home/myUser/.config/Cypress/cy/production/projects/test-auto-hf8d5df2269211bd1439f0f01fa123456/bundles/cypress/e2e/frontend/foldercategory/folder_two/my_running_test.feature'

Desired behavior

Cypress would follow the specPattern and run the .feature tests as it does for my other .feature files

the specPattern of my cypress.config

'cypress/e2e/frontend/foldercategory/folderone/my_ok_running_test.feature'

Test code to reproduce

I don't know if there's any test code that can reproduce this error since it doesn't look like a code problem itself, but here is how my cypress.config.js is configured right now:

const { defineConfig } = require('cypress')
const allureWriter = require('@shelex/cypress-allure-plugin/writer')
const createBundler = require('@bahmutov/cypress-esbuild-preprocessor')
const preprocessor = require('@badeball/cypress-cucumber-preprocessor')
const createEsbuildPlugin = require('@badeball/cypress-cucumber-preprocessor/esbuild')

const configEnv = {
    aLotofEnvs: {
 configX: 'localhost'
    }
}
    e2e: {
       specPattern: ['**/*.feature', 'cypress/e2e/api/**/*.cy.js']
    }

Cypress Version

12.5.1

Node version

16.19.0

Operating System

Ubuntu 20.4

Debug Logs

No response

Other

I've found several topics with similar conditions, but no answer could help me. Tried following the clear cache steps on the documentation, updating libs and modifying the file itself, but nothing fixed the issue.

Also, I'm new to the area, so please forgive me if I didn't provide enough information, let me know what else I can provide to get any help on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions