0

I have upgraded my project from Angular 14 to Angular 16. we are facing the below issue:

Uncaught SyntaxError: Unexpected token '=' in main.js file
Uncaught SyntaxError: Unexpected token '=' in zone.min.js file

Not able to run the project in to google chrome browser version( 81.0.4044.92)

Below is the packages in my package.json file

"dependencies": {
    "@agm/core": "^1.1.0",
    "@angular/animations": "^16.0.3",
    "@angular/cdk": "^16.0.2",
    "@angular/common": "^16.0.3",
    "@angular/compiler": "^16.0.3",
    "@angular/core": "^16.0.3",
    "@angular/forms": "^16.0.3",
    "@angular/google-maps": "^16.0.2",
    "@angular/localize": "^16.0.3",
    "@angular/material": "^16.0.2",
    "@angular/platform-browser": "^16.0.3",
    "@angular/platform-browser-dynamic": "^16.0.3",
    "@angular/router": "^16.0.3",
    "@angularclass/hmr": "^2.1.3",
    "@googlemaps/markerclusterer": "^2.0.15",
    "@material/tooltip": "^15.0.0-canary.576d3d2c8.0",
    "@microsoft/signalr": "^7.0.3",
    "@ng-select/ng-select": "^11.0.0",
    "@ngrx/effects": "^16.0.1",
    "@ngx-translate/core": "^14.0.0",
    "@ngx-translate/http-loader": "^8.0.0",
    "@popperjs/core": "^2.10.2",
    "@progress/kendo-angular-buttons": "12.1.0",
    "@progress/kendo-angular-common": "12.1.0",
    "@progress/kendo-angular-dateinputs": "^7.1.6",
    "@progress/kendo-angular-dialog": "12.1.0",
    "@progress/kendo-angular-dropdowns": "^7.2.4",
    "@progress/kendo-angular-icons": "12.1.0",
    "@progress/kendo-angular-inputs": "^12.1.0",
    "@progress/kendo-angular-intl": "12.1.0",
    "@progress/kendo-angular-l10n": "12.1.0",
    "@progress/kendo-angular-popup": "12.1.0",
    "@progress/kendo-angular-treeview": "^7.1.5",
    "@progress/kendo-angular-upload": "12.1.0",
    "@progress/kendo-drawing": "^1.17.2",
    "@progress/kendo-licensing": "^1.0.2",
    "@progress/kendo-svg-icons": "^1.0.0",
    "@progress/kendo-theme-bootstrap": "^5.12.0",
    "@swimlane/ngx-charts": "^20.3.1",
    "@swimlane/ngx-graph": "^8.0.3",
    "@types/googlemaps": "^3.43.3",
    "agm-direction": "^0.8.10",
    "angular-responsive-carousel2": "^0.0.6",
    "core-js": "^3.29.0",
    "d3-scale": "^4.0.2",
    "firebase": "^9.16.0",
    "jquery": "^3.6.4",
    "lodash-es": "^4.17.21",
    "moment": "^2.29.3",
    "ng-inline-svg": "^13.1.2",
    "ngx-bootstrap": "^10.2.0",
    "ngx-color-picker": "^12.0.1",
    "ngx-gauge": "^7.0.0",
    "ngx-pagination": "^6.0.3",
    "ngx-slick-carousel": "^15.0.0",
    "ngx-spinner": "^16.0.2",
    "ngx-toastr": "^17.0.1",
    "rxjs": "~7.5.0",
    "slick-carousel": "^1.8.1",
    "sweetalert2": "^11.7.10",
    "tslib": "^2.5.0",
    "zone.js": "~0.13.0"
  },
  "devDependencies": {
    "@angular-builders/custom-webpack": "^16.0.0",
    "@angular-devkit/build-angular": "^16.0.3",
    "@angular/cli": "^16.0.3",
    "@angular/compiler-cli": "^16.0.3",
    "@types/jasmine": "^3.10.7",
    "@types/lodash-es": "^4.17.5",
    "@types/node": "^12.11.1",
    "@types/webpack-env": "^1.18.0",
    "jasmine-core": "~4.0.0",
    "karma": "~6.3.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.1.0",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "~1.7.0",
    "ts-node": "^8.10.1",
    "typescript": "~5.0.4"
  }

Successfully running the application in latest version Google Chrome(106.0.0.0)

Please do the needful. Thanks in advance

bhumika
  • 9
  • 2
  • First you are saying that the application does not work in the browser, then you say it works fine in Chrome? Please clarify: In which browser with which version does the error appear? – JSON Derulo Jun 06 '23 at 12:36
  • You say at one point, "Not able to run the project in to browser." And then at the end, "Successfully running the application in Google Chrome". Which is it? Also, Stack Overflow works best when you provide the information up front without making us ask you 900 questions to extract it. Please [edit] your question to show what you have tried, what research you have done, etc. See [ask]. – Heretic Monkey Jun 06 '23 at 12:37
  • Additionally, "Please do the needful" is not the kind of language that makes (unpaid) Stack Overflow users motivated to help you in their spare time, especially when you don't provide enough information to understand and reproduce the issue. I would recommend to reconsider your choice of words. – JSON Derulo Jun 06 '23 at 12:42
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jun 07 '23 at 04:15
  • @JSONDerulo Heretic Monkey Thanks for the suggestion. I have updated my question – bhumika Jun 07 '23 at 05:14
  • Only the 2 latest major versions of Chrome are supported by Angular, see the [docs](https://angular.io/guide/browser-support). Please share your browserslist configuration. – JSON Derulo Jun 07 '23 at 06:01

0 Answers0