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.

Syntax error on IE11 (or any browser without arrow-functions support)

See original GitHub issue

Expected Behavior

It should be possible to access the application with older browsers when running next dev.

Current Behavior

IE11, for instance, throws a Syntax error when executing main.js.

Steps to Reproduce (for bugs)

  1. Install Next.js
  2. Create a demo page
  3. Run next dev
  4. Access application using IE11

I’ve setup a repo to reproduce the bug: https://github.com/lucasconstantino/next-ie11-syntax-error

Context

I’m having a hard time testing my application on IE11 locally.

Your Environment

Tech Version
next 4.1.4
node 7.10.0
OS any windows (tested on browserstack)
browser IE11

Issue Analytics

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

github_iconTop GitHub Comments

6reactions
lucasconstantinocommented, Nov 24, 2017

Pasting some lines of code related to the problem, so to make it appear on search in case anyone needs it:

node_modules/next/node_modules/strip-ansi/index.js:4:

module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;

node_modules/next/node_modules/ansi-regex/index.js:3:

module.exports = () => {
		'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
4reactions
mgiraldocommented, Jan 20, 2018

@timneutkens what polyfills do I need for it to work on ie11?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't this arrow function work in IE 11? - Stack Overflow
You're using arrow functions. IE11 doesn't support them. Use function functions instead. Here's Babel's translation of that to ES5:
Read more >
Syntax error on IE11 (or any browser without arrow-functions ...
IE11, for instance, throws a Syntax error when executing main.js . Steps to Reproduce (for bugs). Install Next.js; Create a demo page; Run ......
Read more >
Arrow functions | Can I use... Support tables for HTML5, CSS3 ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >
Handling common JavaScript problems - MDN Web Docs
Arrow functions are supported across all modern browsers, except for IE. Declaring strict mode at the top of your JavaScript code causes it...
Read more >
ie 11 umbraco backend login is white and show syntax error
If I look the error in ie it looks like is an arrow function but how do I avoid ... I know that...
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