Skip to content

f.Observable.defer is not a function --build-optimizer #7114

Description

@elvirdolic

Bug Report or Feature Request (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.3.0-rc.0
node: 8.0.0
os: win32 x64

Repro steps.

npm --prod --build-optimizer

Build is working without any issues

Starting the app I got a runtime exception

main.533cf46….bundle.js:1 ERROR Error: Uncaught (in promise): TypeError: f.Observable.defer is not a function
TypeError: f.Observable.defer is not a function
    at e.W4CS.t.request (main.533cf46….bundle.js:1)
    at e.W4CS.t.requestHelper (main.533cf46….bundle.js:1)
    at e.W4CS.t.get (main.533cf46….bundle.js:1)
    at e.get (main.533cf46….bundle.js:1)

angular: 4.3.1
angular-material: 2.0.0-beta.8

using it without --build-optimizer it works without any issues

the defer is comming from angular-jwt

https://github.com/auth0/angular2-jwt/blob/435b8fc48415e57da40a788777a53ba37c906620/angular2-jwt.ts

but it's imported correctly there. I'm not sure why it's not working.

The log given by the failure.

Desired functionality.

Mention any other details that might be useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulseverity3: brokentype: bug/fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions