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

--build-optimizer errors #7148

Closed
coryrylan opened this issue Jul 26, 2017 · 5 comments
Closed

--build-optimizer errors #7148

coryrylan opened this issue Jul 26, 2017 · 5 comments

Comments

@coryrylan
Copy link
Contributor

coryrylan commented Jul 26, 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.1
node: 8.1.4
os: win32 x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/platform-server: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.3.0-rc.1
@angular/compiler-cli: 4.1.3

Repro steps.

  1. Download repo here https://github.com/coryrylan/angular-cli-build-optimizer-error
  2. npm install
  3. ng serve --prod --build-optimizer

The log given by the failure.

main.76a9c5a….bundle.js:1 ERROR Error: Uncaught (in promise): TypeError: u.getScrollListener(...).let is not a function
TypeError: u.getScrollListener(...).let is not a function
    at main.76a9c5a….bundle.js:1
    at e.invoke (polyfills.cbb4f59….bundle.js:1)
    at r.run (polyfills.cbb4f59….bundle.js:1)
    at t.runOutsideAngular (main.76a9c5a….bundle.js:1)
    at t.e.LazyLoadImageDirective.t.ngAfterContentInit (main.76a9c5a….bundle.js:1)
    at yn (main.76a9c5a….bundle.js:1)
    at mn (main.76a9c5a….bundle.js:1)
    at gn (main.76a9c5a….bundle.js:1)
    at Wn (main.76a9c5a….bundle.js:1)
    at rr (main.76a9c5a….bundle.js:1)
    at main.76a9c5a….bundle.js:1
    at e.invoke (polyfills.cbb4f59….bundle.js:1)
    at r.run (polyfills.cbb4f59….bundle.js:1)
    at t.runOutsideAngular (main.76a9c5a….bundle.js:1)
    at t.e.LazyLoadImageDirective.t.ngAfterContentInit (main.76a9c5a….bundle.js:1)
    at yn (main.76a9c5a….bundle.js:1)
    at mn (main.76a9c5a….bundle.js:1)
    at gn (main.76a9c5a….bundle.js:1)
    at Wn (main.76a9c5a….bundle.js:1)
    at rr (main.76a9c5a….bundle.js:1)
    at s (polyfills.cbb4f59….bundle.js:1)
    at s (polyfills.cbb4f59….bundle.js:1)
    at polyfills.cbb4f59….bundle.js:1
    at e.invokeTask (polyfills.cbb4f59….bundle.js:1)
    at Object.onInvokeTask (main.76a9c5a….bundle.js:1)
    at e.invokeTask (polyfills.cbb4f59….bundle.js:1)
    at r.runTask (polyfills.cbb4f59….bundle.js:1)
    at o (polyfills.cbb4f59….bundle.js:1)
    at <anonymous>

Mention any other details that might be useful.

Using the build optimizer flag on a large internal app we get the following error. It looks like we get the error in this third party directive https://github.com/tjoskar/ng-lazyload-image.

@elvirdolic
Copy link

Dupe of #7114

@coryrylan
Copy link
Contributor Author

Not sure if a dupe as the errors are different and the optimizer has several separate optimization steps that could cause issues.

@clydin
Copy link
Member

clydin commented Jul 28, 2017

The underlying cause of the two issues is the same.
Any package that down-levels imports to require calls will be affected if the import doesn't contain an import clause (e.g., import 'xyz';). This would most prominently affect rxjs addition imports. Work is underway on a fix.

@filipesilva
Copy link
Contributor

Heya, thanks @elvirdolic and @clydin for tracking down the common cause. I'll close as duplicate of #7114 to make it easier to track and fix.

@filipesilva filipesilva marked this as a duplicate of #7114 Jul 31, 2017
@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
None yet
Projects
None yet
Development

No branches or pull requests

4 participants