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

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

Closed
elvirdolic opened this issue Jul 24, 2017 · 3 comments · Fixed by #7262
Closed

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

elvirdolic opened this issue Jul 24, 2017 · 3 comments · Fixed by #7262
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity3: broken type: bug/fix

Comments

@elvirdolic
Copy link

elvirdolic commented Jul 24, 2017

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.

@scttcper
Copy link
Contributor

scttcper commented Jul 24, 2017

getting same issue with 1.3.0-rc.1 using same angular2-jwt

Edit: worth checking out the angular2-jwt beta that uses interceptors and the new 4.3 http lib. No more use of defer either.

@filipesilva
Copy link
Contributor

This is indeed a problem with the build optimizer, related to angular/devkit#51. Will fix.

@filipesilva filipesilva self-assigned this Jul 28, 2017
@filipesilva filipesilva added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity3: broken type: bug/fix labels Jul 28, 2017
@filipesilva filipesilva marked this as a duplicate of #7148 Jul 31, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Aug 3, 2017
hansl pushed a commit that referenced this issue Aug 3, 2017
hansl pushed a commit that referenced this issue Aug 3, 2017
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity3: broken type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants