0

I'm running an Angular 7 application and I'm trying to run it in IE11 and its showing me this error:

"SCRIPT1002: Syntax error " "vendor.js"

and the web page shows as a blank page.

In other browsers its working fine.

I have tried with uncomment polyfills and also tried with adding below line in index.html file

<meta http-equiv="X-UA-Compatible" content="IE=edge" >

Below is my package.json file :

{
    "name": "eyerne-frontend",
    "version": "0.0.0",
    "scripts": {
        "ng": "ng",
        "start": "node --max_old_space_size=5045 node_modules/@angular/cli/bin/ng serve --aot",
        "build": "ng build --prod",
        "test": "ng test",
        "lint": "ng lint",
        "e2e": "ng e2e"
    },
    "private": true,
    "dependencies": {
        "@agm/core": "^1.0.0-beta.6",
        "@alyle/ui": "^2.7.6",
        "@angular/animations": "^7.2.15",
        "@angular/cdk": "^7.3.7",
        "@angular/common": "~7.2.0",
        "@angular/compiler": "~7.2.0",
        "@angular/core": "~7.2.0",
        "@angular/forms": "~7.2.0",
        "@angular/material": "^7.3.7",
        "@angular/platform-browser": "~7.2.0",
        "@angular/platform-browser-dynamic": "~7.2.0",
        "@angular/router": "~7.2.0",
        "@ng-bootstrap/ng-bootstrap": "^4.1.3",
        "@ngx-translate/core": "^11.0.1",
        "@ngx-translate/http-loader": "^4.0.0",
        "amazing-time-picker": "^1.8.0",
        "angular-datatables": "^8.0.0",
        "angular-gridster2": "^8.2.0",
        "angular-resizable-element": "^3.2.4",
        "angular2-resizing-cropping-image": "^1.0.2",
        "angular2-toaster": "^7.0.0",
        "bootstrap": "^4.3.1",
        "chroma-js": "^2.0.6",
        "classlist.js": "^1.1.20150312",
        "core-js": "^2.5.7",
        "datatables": "^1.10.18",
        "datatables.net": "^1.10.19",
        "datatables.net-dt": "^1.10.19",
        "echarts": "^4.2.1",
        "exif-js": "^2.3.0",
        "file-saver": "^2.0.2",
        "font-awesome": "^4.7.0",
        "hammerjs": "^2.0.8",
        "html2canvas": "^1.0.0-rc.4",
        "jquery": "^3.4.1",
        "merge-images": "^1.1.0",
        "moment": "^2.24.0",
        "ng-http-loader": "^5.1.0",
        "ng2-validation": "^4.2.0",
        "ng5-slider": "^1.2.4",
        "ngx-bootstrap": "^4.3.0",
        "ngx-chips": "^2.0.0-beta.0",
        "ngx-color-picker": "^8.1.0",
        "ngx-cookie-service": "^2.2.0",
        "ngx-echarts": "^4.2.1",
        "ngx-google-places-autocomplete": "^2.0.4",
        "ngx-slick-carousel": "^0.4.4",
        "ngx-webcam": "^0.2.6",
        "ngx-xml2json": "^1.0.2",
        "recordrtc": "^5.5.8",
        "rxjs": "^6.3.3",
        "slick-carousel": "^1.8.1",
        "socket.io-client": "^2.3.0",
        "ts-ebml": "^2.0.2",
        "tslib": "^1.9.0",
        "web-animations-js": "^2.3.2",
        "zone.js": "~0.8.26"
    },
    "devDependencies": {
        "@angular-devkit/build-angular": "~0.13.0",
        "@angular/cli": "~7.3.0",
        "@angular/compiler-cli": "~7.2.0",
        "@angular/language-service": "~7.2.0",
        "@types/datatables.net": "^1.10.17",
        "@types/echarts": "^4.1.9",
        "@types/jasmine": "~2.8.8",
        "@types/jasminewd2": "~2.0.3",
        "@types/jquery": "^3.3.30",
        "@types/node": "~8.9.4",
        "codelyzer": "~4.5.0",
        "jasmine-core": "~2.99.1",
        "jasmine-spec-reporter": "~4.2.1",
        "karma": "^4.3.0",
        "karma-chrome-launcher": "~2.2.0",
        "karma-coverage-istanbul-reporter": "~2.0.1",
        "karma-jasmine": "~1.1.2",
        "karma-jasmine-html-reporter": "^0.2.2",
        "protractor": "~5.4.0",
        "ts-node": "~7.0.0",
        "tslint": "^5.11.0",
        "typescript": "~3.2.2"
    }
}

What am I doing wrong? Please let me know if you can help me with this.

Nathaniel Flick
  • 2,902
  • 2
  • 22
  • 31
  • try to modify in polyfills.ts. Some polyfills may be commented out, since modern browsers don’t need them, so you need to remove the comments. Additionally, you may need to install additional polyfills to provide support for features which IE11 does not support – JustCode Oct 17 '19 at 07:17
  • I have tried with many ways to modify in polyfills. But, none of them is working for me – Dhara Gadhiya Oct 17 '19 at 07:22
  • How about upgrading to Angular 8? Check this related [SO post](https://stackoverflow.com/questions/56379067/how-do-i-support-internet-explorer-in-an-angular-8-application/56573079#56573079). – Jessica Rodriguez Oct 17 '19 at 07:23
  • Also, try with this but no luck. – Dhara Gadhiya Oct 17 '19 at 07:36
  • one of your dependencies might not support IE, try to see which code it refers to, which library is using it – Normunds Kalnberzins Oct 17 '19 at 07:38
  • I have check with multiple dependencies but not able to identify which is not working in IE11. – Dhara Gadhiya Oct 17 '19 at 09:49
  • Can't reproduce the problem on my machine. I have tried to create an Angular 7 Application using your package.json file, the page works well in IE browser. So, please check your code, can you post the Enough code to reproduce the problem as in [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). – Zhi Lv Oct 17 '19 at 11:01

0 Answers0