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.

Class constructor BehaviorSubject cannot be invoked without 'new' in angular app with es6 target

See original GitHub issue

RxJS version: 5.5.4

Code to reproduce:

  1. Clone this repo: https://github.com/ShinDarth/angular-test-app
  2. npm install
  3. ng serve --aot or ng serve --prod then you can install rxjs 5.4.3 and app will work fine.

Expected behavior: App works as expected

Actual behavior: App throws Class constructor BehaviorSubject cannot be invoked without 'new' at start

Additional information: Everything works fine if I downgrade rxjs to 5.4.3. Looks like regression or a breaking change https://github.com/angular/angular-cli/issues/8910 https://github.com/valor-software/ngx-bootstrap/issues/3252

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
FrancescoBorzicommented, Mar 16, 2018

This is what I get after cloning https://github.com/ShinDarth/angular-test-app, running npm install and then ng start --prod:

image

rxjs version in package-lock.json:

image

0reactions
lock[bot]commented, Jun 5, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class constructor BehaviorSubject cannot be invoked without 'new ...
Class constructor BehaviorSubject cannot be invoked without 'new' in angular app with es6 target.
Read more >
Class constructor cannot be invoked without 'new' in TS
The "Class constructor cannot be invoked without new" error occurs when the target property in tsconfig.json is set to lower than es6 or...
Read more >
Class constructor BehaviorSubject cannot be invoked without ...
I get this error during opening datepicker from ngx-Bootstrap (in production version). But changing lib and target hasn't fixed it. It ...
Read more >
Angular script compilation: TypeError: Class constructor ...
Hi there, We are running a project in an Ionic/Angular app, imported from Editor v4.0.2 and it seems we have a compilation problem...
Read more >
typeerror: class constructor servecommand cannot be invoked ...
tsconfig.json { "compilerOptions": { "target": "es6" } }
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