question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng serve/build doesn't work on IE11 when IVY is enabled

See original GitHub issue

🐞 Bug report

Command (mark with an x)

- [x] build
- [x] serve

Description

When ivy is enabled app throws error on IE11 after ng serve and ng build.

SCRIPT1046: Multiple definitions of a property not allowed in strict mode
File: vendor.js, line: 4066, column: 25
NgForOf.ngDirectiveDef = _angular_core__WEBPACK_IMPORTED_MODULE_0__["Ξ”defineDirective"]({ type: NgForOf, selectors: [["", "ngFor", "", "ngForOf", ""]], factory: function NgForOf_Factory(t) { return new (t || NgForOf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Ξ”directiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["Ξ”directiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["Ξ”directiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"])); }, inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" } });
/*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["Ι΅setClassMetadata"](NgForOf, [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"],
        args: [{ selector: '[ngFor][ngForOf]' }]
    }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] }]; }, { _viewContainer: [], _template: [], _differs: [], _ngForOfDirty: [], _differ: [], ngForOf: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }], ngForTrackBy: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }], ngForTrackBy: [], ngForTemplate: [{  <========== HERE IS AN ERROR
            type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"]
        }], ngDoCheck: [], _applyChanges: [], _perViewChange: [] });
    return NgForOf;
}());

πŸ”¬ Minimal Reproduction

demo: demo.zip

  1. ng new demo --enableIvy
  2. add IE11 polyfills
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'core-js/es7/array';
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
import 'web-animations-js';
import 'zone.js/dist/zone';
  1. set "angularCompilerOptions": { "enableIvy": true } in tsconfig.app.json
  2. set "target": "es5" in tsconfig.json
  3. ng serve (or build)

🌍 Your Environment


Angular CLI: 8.0.0-rc.4
Node: 10.15.0
OS: win32 x64
Angular: 8.0.0-rc.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-rc.4
@angular-devkit/build-angular     0.800.0-rc.4
@angular-devkit/build-optimizer   0.800.0-rc.4
@angular-devkit/build-webpack     0.800.0-rc.4
@angular-devkit/core              8.0.0-rc.4
@angular-devkit/schematics        8.0.0-rc.4
@ngtools/webpack                  8.0.0-rc.4
@schematics/angular               8.0.0-rc.4
@schematics/update                0.800.0-rc.4
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexzuzacommented, May 23, 2019
0reactions
angular-automatic-lock-bot[bot]commented, Sep 15, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular ng serve does not include polyfills -- IE11/Edge only ...
The error is due to the development server's live reload client code (from webpack-dev-server) which requires basic ES2015 support. This willΒ ...
Read more >
How To Fix Your Angular App When It's Not Working in IE11
Here's how you can work in IE11 when developing: Add a new tsconfig-es5.app.json file. Update angular.json configuration. Run your application: ng serve ......
Read more >
Angular 9 Application Not Running On Ie11 - ADocLib
ng serve with differential loading hasn't worked in IE11 since Angular 8 source. IE11 only works after an ng build. To workaround duringΒ ......
Read more >
Angular 12 in Depth - SΓ©bastien Dubois
The Angular team has been working on Ivy (the new compilation ... As of Angular 12, ng build will now default to a...
Read more >
Deprecated APIs and features - Angular
@angular/service-worker, SwUpdate#activated, v13, v16. @angular/service- ... CompilerFactory, none, v13, Ivy JIT mode doesn't require accessing this symbol.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found