Skip to content
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

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

Closed
IlyaSurmay opened this issue Dec 20, 2017 · 10 comments

Comments

@IlyaSurmay
Copy link

IlyaSurmay commented Dec 20, 2017

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
angular/angular-cli#8910
valor-software/ngx-bootstrap#3252

@FrancescoBorzi
Copy link

Are there any news about this issue? It looks quite serious...

@FrancescoBorzi
Copy link

I tried using version 5.5.6 and I get:

ERROR Error: Uncaught (in promise): ReferenceError: a296996 is not defined

this happens only when the compile target is es6. The bug does not affect es5.

@valorkin
Copy link

@benlesh hey, is this issue fixed?
Thanks in advance :)

@FrancescoBorzi
Copy link

Bug still present in:

Angular CLI: 1.6.4
Node: 8.9.1
OS: linux x64
Angular: 5.2.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.4
@angular-devkit/build-optimizer: 0.0.37
@angular-devkit/core: 0.0.24
@angular-devkit/schematics: 0.0.45
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.4
@schematics/angular: 0.1.12
typescript: 2.6.2
webpack: 3.10.0

@benlesh
Copy link
Member

benlesh commented Mar 16, 2018

I'm looking into it... but honestly a minimum reproduction is what we want.

@benlesh
Copy link
Member

benlesh commented Mar 16, 2018

Seems like it's been fixed downstream. I have no reproduction now.

I'm not entirely sure what the code was that you thought should work, so I'm not sure what to test.

@benlesh benlesh closed this as completed Mar 16, 2018
@FrancescoBorzi
Copy link

FrancescoBorzi commented Mar 16, 2018

@benlesh please reopen this because I've just tried using version 5.5.7 and the issue is still the same.

Also, as mentioned in the original issue report, there is a repository which reproduce the issue:

- Clone this repo: https://github.com/ShinDarth/angular-test-app
- npm install
- ng serve --aot or ng serve --prod

then you can install rxjs 5.4.3 and app will work fine.

@FrancescoBorzi
Copy link

FrancescoBorzi commented 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

@FrancescoBorzi
Copy link

@benlesh please can you check this?

@lock
Copy link

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants