cucumber/docs

Step of installing cucumber as dependency should be required for the 10 Minute Tutorial

salimdellali opened this issue ยท 3 comments

๐Ÿ‘“ What did you see?

Error: Cannot find module 'cucumber'
Require stack:
- /path-to-cucumber-10-mn-tutorial/cucumber-js-tutorial/features/steps_definition/stepsdefs.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/path-to-cucumber-10-mn-tutorial/cucumber-js-tutorial/features/steps_definition/stepsdefs.js:2:31)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)

โœ… What did you expect to see?

0 scenarios
0 steps
0m00.000s (executing steps: 0m00.000s)

๐Ÿ“ฆ Which tool/library version are you using?

@cucumber/cucumber version 10.0.0
node version 18.15.0
npm version 9.5.0

๐Ÿ”ฌ How could we reproduce it?

following the tutorial 10 Minute Tutorial, the project works fine until you create the file is_it_friday_yet.feature, after you have created the file, and run npm test or npx cucumber-js, the error is thrown

๐Ÿ“š Any additional context?

to fix the problem, install cucumber as a dependency by running npm install cucumber, so the step of installing cucumber as a dependency should occur right before creating the file is_it_friday_yet.js, and needs to be mentioned in the tutorial


This text was originally generated from a template, then edited by hand. You can modify the template here.