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 -o unable to load app in IE edge 25.x and IE edge HTML 13.x using angular 8 browser list .

See original GitHub issue

🐞 bug report

Affected Package

browserlist

Is this a regression?

No

Description

When we create a new angular V8 App using ng new appname and we run it using ng serve -o with browser default to IE edge , we see a blank page with following error in the console.

HTML1300: Navigation occurred.
localhost:4200
SCRIPT1006: Expected ')'
polyfills.js (2979,40)
SCRIPT1006: Expected ')'
vendor.js (290,22)

πŸ”₯ Exception or Error


HTML1300: Navigation occurred.
localhost:4200
SCRIPT1006: Expected ')'
polyfills.js (2979,40)
SCRIPT1006: Expected ')'
vendor.js (290,22)

🌍 Your Environment

Angular Version:




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

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.1
@angular-devkit/build-angular     0.800.1
@angular-devkit/build-optimizer   0.800.1
@angular-devkit/build-webpack     0.800.1
@angular-devkit/core              8.0.1
@angular-devkit/schematics        8.0.1
@angular/cli                      8.0.1
@ngtools/webpack                  8.0.1
@schematics/angular               8.0.1
@schematics/update                0.800.1
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Anything else relevant?

No

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
benouatcommented, Jun 3, 2019

@gkalpak could you please be more specific regarding β€œthis works as intented” ? Because to me it’s not 😞

Let me detail a bit.

ng build is working fine. with differential loading, it uses 2 different builds, and generates an es2015 build and a es5 one. Both dev and prod build work like that.

Below is the output of this behaviour from an freshly scaffolded app with angular-cli

image image

Based on that, I would assume and expect that ng serve is also working like that, even more, I would think it is built on top of that… But apparently it’s not 😞.

image

As you can see on the above screenshot, ng serve is doing a weird single build with only the polyfills to be built in es2015 and es5. What about the other bundle ?

How come is it possible ? I am really confused about that strange behaviour… especially that, if we consider angular.json and the way architect is working (or at least the way I think, or should I say, I tought it is working) serve is supposed to be based on build ?

image

Is the β€œngcli8:build” correspond to the above defined β€œbuild” ? or because the builder is β€œdev-server” it is using something else ?

I am a bit puzzled and confused here… to me intented is not really defined by what I just described. Anyhow I am just trying to figure out what’s going on.


One last point, looking a bit at what is generated inside index.html, both in ng-serve and also in karma for ng test it appears that the code generated only declare a nomodule but no type="module". All bundles seems to be loaded as es2015 without type="module". Isn’t it a bit strange ?

https://github.com/angular/angular-cli/blob/6ec09919b5c2695dee784ce0c3accee7f9754bb0/packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma-debug.html#L31-L39

Angular supports IE 11, 10 and 9 as stated here hence AngularCLI can’t assume that ng serve should only build es2015…

1reaction
gkalpakcommented, Jun 3, 2019

This works as intended. See angular/angular-cli#14455 (as @Alex-Torres mentioned above) for details and work-arounds.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 9 Application Not running on IE11 - Stack Overflow
Uncomment the above import to have your app working with those IE browsers but don't forget to run the following command. npm install...
Read more >
How To Fix Your Angular App When It's Not Working in IE11
Run your application: ng serve --configuration es5 . I recommend to add a run script in package.json for convenience.
Read more >
Angular Service Worker - Step-By-Step Guide
In this post, we will cover how we can configure the Angular CLI build pipeline to generate applications that in production mode areΒ ......
Read more >
Angular directives for Bootstrap - AngularUI
This repository contains a set of native AngularJS directives based on Bootstrap's markup and CSS. As a result no dependency on jQuery or...
Read more >
Changelog - Cypress Documentation
Cypress component tests now correctly load assets with Angular. Fixes #23797. ... Fixed Microsoft Edge browser detection when passing a path on Windows....
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