Const must be initialized, IE11
See original GitHub issueBug 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:
- Create a fresh Next.js instance
- Create a page in pages directory
- Open IE11
- See error in console
Expected behavior
Return no error.
Screenshots


System information
- OS: macOS 10.14.6 (running BrowserStack)
- Browser: IE11
- Version of Next.js: 9.0.6
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@poying only think I did was stop using Next as a dependency in another package. Even as a Peer dependency, this failed.
Interesting… our tests passed for IE 11 for this release:
We’ll dig into this and make sure it causes our tests to fail, thanks for reporting!