Jimmy Mcwan
Jimmy Mcwan

Reputation: 11

E/launcher - Error: TypeError: Cucumber.Cli is not a function

While implementing BDD I developed a test using protractor, cucumber and protractor-cucumber framework.

I don't know what to do with the index.js file.

While running the tests I'm getting the error:

"E/launcher - Error: TypeError: Cucumber.Cli is not a function"

I am using:

Here is the detailed error message:

[11:22:34] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[11:22:34] I/launcher - Running 1 instances of WebDriver
[11:22:37] E/launcher - Error: TypeError: Cucumber.Cli is not a function
    at C:\Users\jxm\Documents\Visual Studio 2015\Projects\ProtractorCucumber_FromScratch\ProtractorCucumber_FromScratch\node_modules\protractor-cucumber-framework\index.js:31:16
    at Function.promise (C:\Users\jxm\Documents\Visual Studio 2015\Projects\ProtractorCucumber_FromScratch\ProtractorCucumber_FromScratch\node_modules\q\q.js:682:9)
    at C:\Users\jxm\Documents\Visual Studio 2015\Projects\ProtractorCucumber_FromScratch\ProtractorCucumber_FromScratch\node_modules\protractor-cucumber-framework\index.js:24:14
    at _fulfilled (C:\Users\jxm\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\jxm\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\jxm\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
    at C:\Users\jxm\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49
    at runSingle (C:\Users\jxm\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:137:13)
    at flush (C:\Users\jxm\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[11:22:37] E/launcher - Process exited with error code 100

Upvotes: 0

Views: 601

Answers (2)

Ram Pasala
Ram Pasala

Reputation: 5231

[email protected] has some breaking changes to the cucumber cli, this is breaking the protractor-cucumber-framework which is written using an older version of cucumber.

An issue has already been logged in the official protractor-cucumber-framework github repo.

Work Around for now would be to downgrade your cucumber version.

Upvotes: 1

Pragnesh
Pragnesh

Reputation: 11

I had this problem yesterday - for some reason it doesnt work work when installing [email protected]

I believe its because when installing protractor-cucumber-framework its says : UNMET PEER DEPENDENCY [email protected]

so seems this version of cucumber is incompatible.

I did: npm install --save-dev [email protected]

Then it worked. I believe this is a protractor-cucumber-framework problem

Upvotes: 1

Related Questions