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.

'Symbol' is undefined in IE11 with Next v5.1.0

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

App should work after upgrading to Next v5.1.0. in Next-js supported browsers.

Current Behavior

Noticed 'Symbol' is undefined issue in IE11 after upgrading to Next v5.1.0. We don’t see this issue with Next v4.x.

Steps to Reproduce (for bugs)

  1. Upgrade app, which has for-of loop in its source code, to Nextv5.1.0.
  2. Open the application in IE 11 after build process and check the dev console.

Context

This is happening with Next v5.1.0.

Code generated for for-of loop with Next v5.1.0

for (var g = l[Symbol.iterator](), w; !(h = (w = g.next()).done); h = true) {                        
}

Next v4.x version with same source code.

for (var h, g = (0,r.default)(l); !(y = (h = g.next()).done); y = !0) {
}

We can fix the issue by adding babel-polyfill or babel runtime-transform to our code but it would be consistent if we have a solution as part of Next build.

Your Environment

Tech Version
next 5.1.0
node 8.11.1
OS windows
browser IE 11
etc
screen shot 2018-04-20 at 9 51 03 am

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
timneutkenscommented, Nov 20, 2018

@matejkonrad can you provide a full reproduction? I assume it’s because you have a module in node_modules that uses Symbol

1reaction
matejkonradcommented, Nov 20, 2018

This is an issue for me on Next 7.0.2 on IE11, Windows 10 (using browserstack)

Read more comments on GitHub >

github_iconTop Results From Across the Web

'Symbol' is undefined in IE11 with Next v5.1.0 #4187 - GitHub
Noticed 'Symbol' is undefined issue in IE11 after upgrading to Next v5.1.0. We don't see this issue with Next v4.x.
Read more >
'Symbol' is undefined in IE 11 - javascript - Stack Overflow
Symbols are a new javascript concept that aren't supported in IE11. http://kangax.github.io/compat-table/es6/#test-Symbol.
Read more >
Releases - styled-components
Implement shouldForwardProp API for native and primitive platforms, which was previously missing in [v5.1.0] (see #3093) This has been released under a ...
Read more >
HTML Standard
2.1.1 Parallelism; 2.1.2 Resources; 2.1.3 XML compatibility; 2.1.4 DOM trees; 2.1.5 Scripting; 2.1.6 Plugins; 2.1.7 Character encodings; 2.1.8 Conformance ...
Read more >
KeyboardEvent.keyCode - Web APIs - MDN Web Docs
Use a keyCode value for an ASCII character produced by a key which is mapped to the same virtual keycode of Windows when...
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