Repository navigation
--build-optimizer errors #7148
Copy link
Copy link
Closed
Description
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.
- Download repo here https://github.com/coryrylan/angular-cli-build-optimizer-error
npm installng 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
elvirdolic commentedon Jul 26, 2017
Dupe of #7114
coryrylan commentedon Jul 27, 2017
Not sure if a dupe as the errors are different and the optimizer has several separate optimization steps that could cause issues.
clydin commentedon 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 commentedon Jul 31, 2017
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.
angular-automatic-lock-bot commentedon Sep 7, 2019
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.