kiwigrid/gherkin-testcafe

Google example fails on fresh install: Cannot find module 'cucumber/lib/models/data_table'

Closed this issue · 5 comments

On a fresh install following the documentation and running the provided Google example:

Lees-MacBook-Pro:app lee$ npm i --save-dev cucumber
npm WARN gherkin-testcafe@2.3.2 requires a peer of cucumber@^5.1.0 but none is installed. You must install peer dependencies yourself.

+ cucumber@1.3.3
updated 1 package and audited 16228 packages in 7.225s
Lees-MacBook-Pro:app lee$ gherkin-testcafe chrome e2e/**/*.js e2e/**/*.feature
internal/modules/cjs/loader.js:626
    throw err;
    ^

Error: Cannot find module 'cucumber/lib/models/data_table'
Require stack:
- /Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/src/compiler.js
- /Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/src/rewire-compiler.js
- /Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/src/cli.js
- /Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/src/compiler.js:7:19)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:681:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/src/compiler.js',
    '/Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/src/rewire-compiler.js',
    '/Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/src/cli.js',
    '/Users/lee/src/egs/app-lsrp/app/node_modules/gherkin-testcafe/main.js'
  ]
}
Lees-MacBook-Pro:app lee$
Lees-MacBook-Pro:app lee$ node -v
v12.4.0
Lees-MacBook-Pro:app lee$ npm -v
6.9.0
Lees-MacBook-Pro:app lee$

Hey @leegee,

the log says, that you do not have installed cucumber. You have to install cucumber in addition to gherkin-testcafe (see readme's installation section).

Please verify that cucumber is installed and try again.

True. But your console also says, that it installed cucumber in version 1.3.3. You need cucumber 5.1.

Ah, thank you!

npm WARN gherkin-testcafe@2.3.2 requires a peer of cucumber@^5.1.0 but none is installed. You must install peer dependencies yourself.

Forked and made a PR to fix that, but despite making the PR on this repo, it seems to have been created against the original repo ('seitgeist')