Skip to content

[gherkin] @cucumber/messages release yesterday broke @cucumber/gherkin package #1437

@christian-bromann

Description

@christian-bromann

Summary

If you install @cucumber/gherkin via:

$ npm install @cucumber/gherkin

You download @cucumber/[email protected] which has a file node_modules/@cucumber/gherkin/dist/src/stream/GherkinStreams.js that imports:

var stream_2 = require("@cucumber/messages/dist/src/stream");

which doesn't exist anymore after the @cucumber/messages release yesterday. I am also a bit confused as to where this code comes from. I looked into:

which is confusing as it now is part of the @cucumber/gherkin-streams package. In the webdriverio integration we made use of the GherkinStreams class so I am wondering if @cucumber/gherkin got deprecated at some point.

Expected Behavior

@cucumber/gherkin should use an updated version of @cucumber/messages.

Current Behavior

An error is being thrown:

Error: Cannot find module '@cucumber/messages/dist/src/stream
Require stack
- /path/to/packages/wdio-cucumber-framework/node_modules/@cucumber/gherkin/dist/src/stream/GherkinStreams.js
- /path/to/packages/wdio-cucumber-framework/build/index.js

Possible Solution

Update use of @cucumber/messages in @cucumber/gherkin but I have no idea if the code is still up to date and which repo I should look at.

I would love to switch to @cucumber/gherkin-streams but that package doesn't exist on NPM yet.

Steps to Reproduce (for bugs)

  1. $ npm install @cucumber/gherkin
  2. create a file that imports a class from the package, e.g. import GherkinStreams from '@cucumber/gherkin/dist/src/stream/GherkinStreams'
  3. run the file: $ node file.js

Context & Motivation

webdriverio/webdriverio#6616

Your Environment

  • Version used:
  • Operating System and version:
  • Link to your project:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Released

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions