Class constructor BehaviorSubject cannot be invoked without 'new' in angular app with es6 target
See original GitHub issueRxJS version: 5.5.4
Code to reproduce:
- Clone this repo: https://github.com/ShinDarth/angular-test-app
npm install
ng serve --aot
orng 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:
- Created 6 years ago
- Reactions:2
- Comments:10 (2 by maintainers)
Top 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 >
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 Free
Top 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
This is what I get after cloning
https://github.com/ShinDarth/angular-test-app
, runningnpm install
and thenng start --prod
:rxjs version in
package-lock.json
: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.