Skip to content
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

Step definitions fail to reload when they contained a faulty import #786

Closed
3 tasks done
Bertg opened this issue Aug 2, 2022 · 2 comments
Closed
3 tasks done

Step definitions fail to reload when they contained a faulty import #786

Bertg opened this issue Aug 2, 2022 · 2 comments

Comments

@Bertg
Copy link

Bertg commented Aug 2, 2022

Current behavior

Given I have a step definition file that contains an invalid (relative) import
When I start cypress and try to run that feature
Then I get the following error
  > Error: Build failed with 1 error:
  > cypress/e2e/test.js:1:42: ERROR: Could not resolve "../support/helpers"
When I then fix the broken import
Then I still get the error

This is using the esbuild solution.

Desired behavior

When the broken import is fixed, the feature should start running.

Test code to reproduce

https://github.com/younited/cypress_cucumber_import_bug

Instructions on how to replicate the issue are in the readme.

Versions

  • Cypress version: 10.4.0
  • Preprocessor version: 12.0.0 (also happens on 11)
  • Node version: 16.14.2

Checklist

  • I've read the FAQ.
  • I've read Instructions for logging issues.
  • I'm not using cypress-cucumber-preprocessor@4.3.1 (package name has changed and it is no longer the most recent version, see #689).
@badeball
Copy link
Owner

badeball commented Aug 3, 2022

This appears to happen even if you don't use the preprocessor, but simply @bahmutov/cypress-esbuild-preprocessor, which means the problem probably lies there. I think you should open up an issue at https://github.com/bahmutov/cypress-esbuild-preprocessor.

@Bertg
Copy link
Author

Bertg commented Aug 4, 2022

@badeball I've opened an issue there.

Depending on how fast that gets resolved, the recommended bundler should change?

Then configure your preferred bundler to process features files. See [examples/](../examples) for how-to using Browserify, Esbuild or Webpack. Esbuild is the recommended bundler if you have no particular requirements (it's by far the fastest).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants