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.

Const must be initialized, IE11

See original GitHub issue

Bug report

Describe the bug

IE11 errors on the file https://github.com/zeit/next.js/blob/2ba352da39ee00b6595aecdc9ffb2f103e803a85/packages/next/next-server/server/utils.ts#L6 returning a Const must be initialized.

Seems as though this issue has come up in the past - https://github.com/zeit/next.js/issues/4334

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a fresh Next.js instance
  2. Create a page in pages directory
  3. Open IE11
  4. See error in console

Expected behavior

Return no error.

Screenshots

image image

System information

  • OS: macOS 10.14.6 (running BrowserStack)
  • Browser: IE11
  • Version of Next.js: 9.0.6

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
jonkwheelercommented, Oct 29, 2019

@poying only think I did was stop using Next as a dependency in another package. Even as a Peer dependency, this failed.

2reactions
Timercommented, Sep 23, 2019

Interesting… our tests passed for IE 11 for this release: image

We’ll dig into this and make sure it causes our tests to fail, thanks for reporting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Const must be initialized" JavaScript error on every page in IE ...
Summary. On every page of GitLab.com, I'm seeing a Const must be initialized error in the dev tools console in IE 11:.
Read more >
IE11 errors on main.js because of const in for (const ... #4334
My Next deployment does not work in IE11. The error is. SCRIPT1053: Const must be initialized File: main.s, Line: 1, Column 503674.
Read more >
Const must be initialized error in Microsoft Edge in for...of loop
I guess it expects const variable to have an initialization value but that's the entire job of the for isn't it? MDN says...
Read more >
Getting a 'Const must be initialized' Error in IE
The issue is, this isn't my code, and isn't present in the cornerstone theme. It seems to be added during the bundling process....
Read more >
JS error in IE11 [#3206637] | Drupal.org
The following line in the JavaScript file: for (const item in ... produces the error in IE11 (SCRIPT1053: Const must be initialized), ...
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