Skip to content

--build-optimizer errors #7148

Closed
Closed

Description

@coryrylan

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.

Activity

  1. elvirdolic commented on Jul 26, 2017

    @elvirdolic

    Dupe of #7114

  2. coryrylan commented on Jul 27, 2017

    @coryrylan
    ContributorAuthor

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

  3. clydin commented on Jul 28, 2017

    @clydin
    Member

    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.

  4. filipesilva commented on Jul 31, 2017

    @filipesilva
    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.

  5. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions