question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Class constructor Alg1 cannot be invoked without 'new'

See original GitHub issue

I have two classes: Alg1 extends Alg2. When I rewire Alg2 and call its constructor new Alg2(),I get the error in the title. Only fails on 3.0.0. Downgrading to 2.5.2 for now - all works fine there.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
JvJefkecommented, Nov 15, 2017

Thanks for the example! I didn’t have the time yet to look into this. I’ll try to do it this evening.

0reactions
rnemeccommented, Nov 15, 2017

My pleasure! Thanks guys for keeping this tool being one of top unit-testing utilities.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class constructor cannot be invoked without 'new' in JS
The "Class constructor cannot be invoked without 'new'" error occurs for 2 reasons: Trying to instantiate a class without using the new operator....
Read more >
Javascript ES6 TypeError: Class constructor Client cannot be ...
When I try to execute nodemon command I always see this error TypeError: Class constructor Client cannot be invoked without 'new'.
Read more >
Javascript ES6 TypeError Class constructor Client cannot be ...
When I try to execute nodemon command I always see this error TypeError: Class constructor Client cannot be invoked without 'new'.
Read more >
Angular script compilation: TypeError: Class constructor ...
TypeError : Class constructor MyScript cannot be invoked without 'new' at requireScriptForNodes (tools.ts:71) at attachScripts (tools.ts:220) ...
Read more >
Reactjs " Class constructor upload cannot be invoked without ...
Im trying to activate a function with reactjs But i keep getting the same error: Uncaught TypeError: Class constructor Upload cannot be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found