Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev server syntax error in IE11 #9293

Closed
tmakin opened this issue Jan 19, 2018 · 10 comments
Closed

Dev server syntax error in IE11 #9293

tmakin opened this issue Jan 19, 2018 · 10 comments

Comments

@tmakin
Copy link

tmakin commented Jan 19, 2018

Versions

Angular CLI: 1.6.5
Node: 8.9.1
OS: win32 x64
Angular: 5.2.1
Internet Explorer: 11

Which pulls in:
webpack-dev-server: 2.11.0

Repro steps

$ng new app
$cd app
$npm start

Navigate to http://localhost:4200 using IE11

Observed behavior

IE11 reports syntax error in console:

SCRIPT1002: Syntax error
vendor.bundle.js (43208,21)

The AOT production build is fine. Just the dev server which is a problem

Desired behavior

Be able to use dev server with IE11

Mention any other details that might be useful (optional)

The cause seems to be fat arrow es6 syntax that has sneaked into the webpack-dev-server output. See here:
webpack/webpack-dev-server#1278

So probably this will be fixed with the next update to webpack-dev-server

@surensubhu
Copy link

I am also facing the same issue.

@alexciesielski
Copy link

Also having this issue

@tmakin tmakin closed this as completed Jan 21, 2018
@tmakin
Copy link
Author

tmakin commented Jan 21, 2018

This is now fixed. Just rerun npm install and check you have picked up webpack-dev-server 2.11.1.

$npm ls webpack-dev-server
webpack-dev-server@2.11.1

@surensubhu
Copy link

@tmakin It worked.. Thanks!!

@ayush987goyal
Copy link

Still facing the issue even after webpack-dev-server@2.11.1 in IE11

@tmakin
Copy link
Author

tmakin commented Jan 22, 2018

Looks like the fix was to downgrade strip-ansi to version ^3.0.0, so I would check what version you have installed. Maybe a clean npm install would help.
webpack/webpack-dev-server@b78e249

@ayush987goyal
Copy link

I did a clean npm install by removing node_modules. Still facing the issue while in development mode. It works fine with prod build.

@tmakin
Copy link
Author

tmakin commented Jan 22, 2018

Must still be picking up wrong version. I suggest manual install of webpack-dev-server or add an explicit dependency on 2.11.1 in your package json.

"webpack-dev-server": "^2.11.1"

Either way, IE is not going to work until the following command returns ^3.0.0

$npm info webpack-dev-server dependencies.strip-ansi
^3.0.0

Edit
Use npm ls webpack-dev-server instead to check local version. npm info pulls in the registry info I think.

@ayush987goyal
Copy link

The above commands returns ^3.0.0 but I am still having trouble. I have opened a issue for the same #9310

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants