angular: IE11 Polyfills Issue - SCRIPT1002: Syntax error main.bundle.js
I’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
I cannot open the project in IE11. The following error is thrown - SCRIPT1002: Syntax error main.bundle.js
I have done the following steps after investigating the issue a couple of hours:
- Enabled polyfills
- Added shims to index.html - https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js
- Set __Zone_enable_cross_context_check property to true in index.html file.
- Set es5 in tsconfig files.
Expected behavior
Minimal reproduction of the problem with instructions
A fully runnable sample is available here - https://github.com/danail-vasilev/test-ng2-ie11 Just clone the repo and run: npm install npm start
What is the motivation / use case for changing the behavior?
Environment
Angular version: X.Y.Z
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [x] IE version 11
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 24 (10 by maintainers)
I am also facing the running issue with IE11. I already uncommented required import statement from polyfills. It is not working for me. I am getting an error in the vendor.js “const ucs2encode = array => String.fromCodePoint(array);” Does anyone faced the same issue.
@danail-vasilev , about the
registry
, by default, it not exists, so you need to create the keys yourself, I also tried those settings inWindows 10
.And about the point3 .
in fact, there are several issues related with
IE
.target -> es6
, IE will not work and throw error likeSyntax error
.developer tools
and without set the__Zone_enable_cross_context_check
flag, the error likeCan't execute code from a freed script
may occur. in this case, you should set the flag to true in polyfill, it will have some performance impact so you should only do this indev
mode.SecurityError
, I believe this is thewebsocket
error withdev
server. so you should try theregistry
way.I would like to make a PR to add those information as
trouble shooting
inaio document
(I am not sure it is the right place) later.I am facing the same issue. The culprit seems to be punycode@2.1.1 included by @angular-devkit. This is my dependency tree: