TypeError: Class constructor CucumberJSAllureFormatter cannot be invoked without 'new'
See original GitHub issueIt’s working for typescript configuration but not for Java script config. Same issue when you use versions:
"cucumber": "5.1.0",
"allure-cucumberjs": "2.0.0-beta.4",
Next Configuration
var CucumberJSAllureFormatter = require('allure-cucumberjs').CucumberJSAllureFormatter;
var AllureRuntime = require('allure-cucumberjs').AllureRuntime;
function Reporter(options) {
CucumberJSAllureFormatter.call(this,
options,
new AllureRuntime({ resultsDir: "./out/allure-results" }),
{});
}
Reporter.prototype = Object.create(CucumberJSAllureFormatter.prototype);
Reporter.prototype.constructor = Reporter;
exports.default = Reporter;
TypeError: Class constructor CucumberJSAllureFormatter cannot be invoked without 'new'
at new Reporter (C:\Users\fescobar\Documents\git\cross-automation\allure-report.js:5:29)
at Function.build (C:\Users\fescobar\Documents\git\cross-automation\node_modules\cucumber\lib\formatter\builder.js:49:12)
at C:\Users\fescobar\Documents\git\cross-automation\node_modules\cucumber\lib\cli\index.js:121:35
at Generator.next (<anonymous>)
at asyncGeneratorStep (C:\Users\fescobar\Documents\git\cross-automation\node_modules\cucumber\lib\cli\index.js:44:103)
at _next (C:\Users\fescobar\Documents\git\cross-automation\node_modules\cucumber\lib\cli\index.js:46:194)
Related issue: https://github.com/korobochka/cucumberjs-allure2-reporter/issues/4
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
TypeError: Class constructor model cannot be invoked without ...
When I run my app, an error appears: TypeError: Class constructor model cannot be invoked without 'new' at line 17 which is the...
Read more >Solved: TypeError: Class constructor Recenter cannot be in...
Solved: Hi, I'm following this "Custom Widget" sample from.
Read more >Class constructor Class cannot be invoked without 'new'
I'm getting the following error in the console of the browser, when trying to access my route “login”: Uncaught (in promise) TypeError: ...
Read more >Jest fails with 'Class constructor Spec cannot be invoked ...
TypeError : Class constructor Spec cannot be invoked without 'new' 85 | function createdPatchedSpec(OriginalSpec, registry) { 86 | function ...
Read more >TypeError: Class constructor HTMLElement cannot be invoked ...
TypeError : Class constructor HTMLElement cannot be invoked without 'new' · 1) Install custom elements es5 adapter for your project. npm i custom- ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this one right
see README.md
I can still see the issue, it’s preventing me to update to “cucumber”: “^6.0.5” Could you let me know when you expect to fix this please?