-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cucumber.Cli is not a function #64
Comments
Vote up on this one. Got same error and stuck. Only way to get this working is to use older version of cucumber for me it worked with v.0.9.1 |
Thanks, got this resolved by using the older version of cucumber |
I don't know if you should close this, because the bug still exists. Only now workaround is possible. |
I ran into this issue yesterday , downgrading the version was the only option. |
Same issue. We would like to use the new version of cucumber, but can't without an updated version of this package |
@darrinholst @mattfritz cucumber 2.0.0 has some breaking changes to the cucumber cli changelog.md.This is breaking protractor-cucumber-framework with this cucumber version. I just had a look at the code , |
yeah...I've been avoiding upgrading cucumber until someone fixed it. 😉 |
I've started work in supporting cucumber 2 here. If any of you can pull this repo in and report back on whether everything is working I'll put a PR together. "cucumber": "2.0.0-rc.4",
"protractor-cucumber-framework": "darrinholst/protractor-cucumber-framework#cucumber-2", |
@darrinholst Sure I am on it, in fact i was planning to work on this anyways let me help you in evaluating! |
@darrinholst I tried implementing your cucumber2 branch but now all of the steps are marked as undefined. It seems that there's an issue with the framework resolving the path for step definitions. Perhaps it's just my project though, I'm not sure |
The way you define steps isn't backwards compatible within cucumber. You might be running into that. Details are here along with the rest of the breaking changes. |
@g2valdez Writing step definitions have changed from cucumber 2 version. These are some breaking changes, even the cucumber CLI has tons of breaking changes. For starters now you have to import
@darrinholst I have tried running with latest cucumber version and the PR is working for me. However I haven't tried running all scenarios. Also if its fine I could write some example specs with new version and send a PR? |
It'd be nice if we could figure out a way to test both/all versions of cucumber in the same branch and test suite. I didn't pursue that at all. I'm guessing that there is and will be a lot of legacy projects depending on cucumber 1 support. Either that or we decide to cut over to version 2 exclusively here and bump the major version on this module. |
The first option makes much sense as cucumber 2.0 is still in RC phase and I see lot of projects depend on cucumber 1, I suppose we would have to test both the versions, any suggestions to achieve it would help actually! |
Hi there guys, What is the current progress on this issue? |
@darrinholst @igniteram two subdirectories, each with their own package.json specifying a different version of cucumber? Then |
This has been fixed with v1.0.0 |
Hi Matt,
I am unable to resolve the below issue...
Please advise. Thanks
[10:54:43] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[10:54:43] I/launcher - Running 1 instances of WebDriver
[10:54:46] E/launcher - Error: TypeError: Cucumber.Cli is not a function
at C:\Users\uru\AppData\Roaming\npm\node_modules\protractor-cucumber-framework\ind
ex.js:31:16
at Function.promise (C:\Users\uru\AppData\Roaming\npm\node_modules\q\q.js:682:9)
at C:\Users\uru\AppData\Roaming\npm\node_modules\protractor-cucumber-framework\ind
ex.js:24:14
at _fulfilled (C:\Users\uru\AppData\Roaming\npm\node_modules\protractor\node_modul
es\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\uru\AppData\Roaming\npm\node_modules\protra
ctor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\uru\AppData\Roaming\npm\node_modules
protractor\node_modules\q\q.js:796:13)
at C:\Users\uru\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:55
6:49
at runSingle (C:\Users\uru\AppData\Roaming\npm\node_modules\protractor\node_module
s\q\q.js:137:13)
at flush (C:\Users\uru\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)
[10:54:46] E/launcher - Process exited with error code 100
Below is conf.js file i am using...
//protractor.conf.js
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
getPageTimeout: 60000,
allScriptsTimeout: 500000,
framework: 'custom',
// path relative to the current config file
//frameworkPath: require.resolve('C:/Users/uru/AppData/Roaming/npm/node_modules/protractor-cucumber-framework'),
frameworkPath: 'C:/Users/uru/AppData/Roaming/npm/node_modules/protractor-cucumber-framework',
capabilities: {
'browserName': 'chrome'
},
// Spec patterns are relative to this directory.
specs: [
'D:/tractor/features/*.feature'
],
baseURL: 'https://angularjs.org/',
cucumberOpts: {
require: 'D:/tractor/features/step_definitions/my_step_definitions.js',
tags: false,
format: 'pretty',
profile: false,
'no-source': true
}
};
The text was updated successfully, but these errors were encountered: