github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Cyperss 10.7.0 - Unable to resolve absolute paths

Open barnie-karbonhq opened this issue 2 years ago • 1 comments

I am migrating from 8 -> 10 and project set up as below

cypress
config
|__
    cypress_local.config.js
    cypress_ltest.config.js
    cypress_live.config.js

And I have absolute paths allover the project, which worked fine in cypress 8. When running in cypress 10.7.0m, its not resolving and its resulting in the below error

Error: Webpack Compilation Error
../cypress/e2e/feature-tests/Billing/unbilled.cy.js
Module not found: Error: Can't resolve  '/cypress/support/datacreation.js' in 'C:\Dev\karbonhq-e2e-testing\cypress\e2e\feature-tests\Billing'

root path C:\Dev\karbonhq-e2e-testing\config
      using description file: C:\Dev\karbonhq-e2e-testing\package.json (relative path: ./config/cypress/support/datacreation.js)
        no extension
          Field 'browser' doesn't contain a valid alias configuration

Not sure how to change the root path to C:\Dev\karbonhq-e2e-testing instead of C:\Dev\karbonhq-e2e-testing\config

If I change the absolute paths to relative it works fine. Please help.

barnie-karbonhq avatar Sep 02 '22 06:09 barnie-karbonhq

@barnie-karbonhq is this related to using the Cypress GitHub Action or just Cypress in general?

admah avatar Sep 06 '22 19:09 admah

Closing due to inactivity.

MikeMcC399 avatar Nov 06 '23 14:11 MikeMcC399