cypress-esbuild-preprocessor icon indicating copy to clipboard operation
cypress-esbuild-preprocessor copied to clipboard

Compatibility issues with the latest Cucumber preprocessor

Open Darksymphony75 opened this issue 2 years ago • 1 comments

I am using Cypress 10 with @badeball/cypress-cucumber-preprocessor and your Cypress-esbuild-preprocessor.

Everything worked very well, but now I updated the Cucumber preprocessor to the latest version 12.2.0 (before I think I had 11.5.0).

Now seems, your esbuild preprocessor is not compatible with the latest cucumber, I have this error:

Error: Build failed with 1 error:
node_modules/common-ancestor-path/index.js:17:37: ERROR: [plugin: feature] Reduce of empty array with no initial value
    at failureErrorWithLog (C:\Users\JS\Desktop\test\node_modules\esbuild\lib\main.js:1605:15)
    at C:\Users\JS\Desktop\test\node_modules\esbuild\lib\main.js:1251:28
    at runOnEndCallbacks (C:\Users\JS\Desktop\test\node_modules\esbuild\lib\main.js:1034:63)
    at buildResponseToResult (C:\Users\JS\Desktop\test\node_modules\esbuild\lib\main.js:1249:7)
    at C:\Users\JS\Desktop\test\node_modules\esbuild\lib\main.js:1358:14
    at C:\Users\JS\Desktop\test\node_modules\esbuild\lib\main.js:666:9
    at handleIncomingPacket (C:\Users\JS\Desktop\test\node_modules\esbuild\lib\main.js:763:9)
    at Socket.readFromStdout (C:\Users\JS\Desktop\test\node_modules\esbuild\lib\main.js:632:7)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

and this prevents Cypress tests to run as due to this error no tests are found.

The only solution that worked was to downgrade Cucumber preprocessor to the previous version.

Please take a look and it'll be good if you take care of this esbuild preprocessor and regularly release a compatible versions.

Thank you

Darksymphony75 avatar Sep 16 '22 18:09 Darksymphony75

I had a similar incompatibility issue after upgrading cypress-esbuild-preprocessor and adding latest esbuild as a peer dependency, but found it was solved by upgrading cypress-cucumber-preprocessor to the latest version (currently 15.1.4).

matt2112 avatar Mar 07 '23 14:03 matt2112