Based on https://github.com/TheBrainFamily/cypress-cucumber-preprocessor#with-out-of-the-box-support
and the official example repo, when I run the test-script

Oops...we found an error preparing this test file:
cypress/support/index.js
The error was:
TypeError: undefined is not a function
No error
https://github.com/hiaux0/cypress-cucumber-example
One commit which adds out-of-the-box webpack preprocessing
Thanks for the report @hiaux0 , sorry for the troubles. @bauglir would you be able to do some debugging? Do we need tsconfig or something?
Sorry for the slow response, apparently GitHub has stopped sending me notifications by e-mail again...
I don't think a tsconfig.json is strictly necessary, although any project actually using TypeScript should probably have one. The tests run fine without one for me, perhaps for IDE support it might be necessary, I'm not 100% sure.
The issue here is that this functionality isn't in a release yet, so depending on a released version (i.e. ^2.5.0) won't work. If I change the example repository to use the master branch the error doesn't occur. This error is actually caused by not having the most recent version of the @cypress/browserify-preprocessor being depended on by all packages.
I'm also not sure if the explicit dependency on @cypress/browserify-preprocessor is necessary. If I remove it in the example everything still works for me as well.
hi guys, seems to be a destructuring error in @cypress/browserify-preprocessor
const hasTsifyTransform = transform.some(([name]) => name.includes('tsify'))
cypress-cucumber-preprocessor wrapped the browserify options' transform with a function entry [Function: tranform, [{...}], [{...}]]
That issue is addressed in https://github.com/cypress-io/cypress-browserify-preprocessor/pull/57 @pauljosephatay. The main problem here, as I mentioned in https://github.com/TheBrainFamily/cypress-cucumber-preprocessor/issues/426#issuecomment-669112396, is that the latest release of this package does not depend on at least v3.0.1 of @cypress/browserify-preprocessor. When depending on master of cypress-cucumber-preprocessor everything works as expected.
@lgandecki can you tag a new version so this issue can be closed?
Sorry, something didn't click in the automatic release version and somehow I didn't understand your previous comment that basically stated that all we need is a release.
Fixed now!
No worries! I could probably have been a bit more to the point 馃槃
Thanks for the release 馃帀 . I just updated my project to it and everything keeps working like a charm, so it should be all good.
Most helpful comment
Sorry for the slow response, apparently GitHub has stopped sending me notifications by e-mail again...
I don't think a
tsconfig.jsonis strictly necessary, although any project actually using TypeScript should probably have one. The tests run fine without one for me, perhaps for IDE support it might be necessary, I'm not 100% sure.The issue here is that this functionality isn't in a release yet, so depending on a released version (i.e.
^2.5.0) won't work. If I change the example repository to use themasterbranch the error doesn't occur. This error is actually caused by not having the most recent version of the@cypress/browserify-preprocessorbeing depended on by all packages.I'm also not sure if the explicit dependency on
@cypress/browserify-preprocessoris necessary. If I remove it in the example everything still works for me as well.