-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Examples updated to v3.0.3 don't work in IE 11 #2747
Comments
What's the specific error? We reported and fixed a few IE11 issues testing the v3 prerelease, but everything was working fine last time I checked. We don't use use the static export stuff though. |
Looks like the Babel + Webpack combo isn't downgrading the JavaScript in the 2 dependencies chalk/ansi-regex and chalk/strip-ansi which are written using ES6 arrow functions. IE 11 is seeing the following code and throwing a syntax error.
I "think" this is the only section in the See the following screenshots: |
Most packages by Sindre Sorhus are explicitly for recent Node environments only and not browsers, he closes a lot of issues relating to that as won't-fix. Babel does not operate on node_modules, Webpack will add any ES6 syntax to the bundle as-is from an npm package. It would be good to work out why these packages are included in the client bundle. |
Looks like strip-ansi is a dependency however I don't see where with a simple GitHub search. I'll have to dig into this further in the AM. |
This error only exists when running
Then add the
When I type the following in terminal, everything works fine.
BTW, I'm testing all this on a mac and using the Free Virtual Machines by MS. |
I can't remember where it's documented, don't hold me to it, but I'm pretty sure IE11 is only supported for builds. |
I'm having the exact same issue, actually had it with "^3.0.1-beta.18" also. |
Same issue here |
Having same issue but only when running Also not limited to, but next@3 has |
@timneutkens I believe this is due to #2325. Probably requires a PR to downgrade |
@cheshirecode great catch, I'm open to downgrading the package 👍 |
I've submitted a PR to this. #2860 |
could be closed. fixed in version 3.1.0. |
Thanks for the PR |
Seeing the same issue |
v 4.1.0 In IE 11 Error. The object does not support the "from" property or method
The TypeError: object does not support the "from" property or method
At _toConsumableArray (http://127.0.0.1:3000/_next/1508422415649/main.js:13836:169)
At Anonymous function (http://127.0.0.1:3000/_next/1508422415649/main.js:13896:9)
At instantiate (http://127.0.0.1:3000/_next/1508422415649/main.js:13894:8)
At Unknown (Function code:2:10)
At mountIndeterminateComponent (http://127.0.0.1:3000/_next/1508422415649/commons.js:10406:7)
At beginWork (http://127.0.0.1:3000/_next/1508422415649/commons.js:10607:9)
At performUnitOfWork (http://127.0.0.1:3000/_next/1508422415649/commons.js:12579:5)
At workLoop (http://127.0.0.1:3000/_next/1508422415649/commons.js:12688:11)
At callCallback (http://127.0.0.1:3000/_next/1508422415649/commons.js:1305:9) function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } |
@arunoda I think it's one of the most critical bugs in Next.js since one of the core philosophies of Next.js is to provide server-side-rendering, why? mainly to get indexed by search engines. and since google uses Chrome v41 to crawl websites, all Next.js powered websites have error and they are not fully loaded with google crawlers. |
Same here. Please re-open. |
Quick and dirty solution; add as post-build step for your prod bundle. Works for me.
Replaces all |
This isn't conclusive but FWIW, i don't think this bug is affecting the actual google bot crawler. zeit.co (which i assume is ~ next@latest) throws the error on pagespeed insights, but in the google cache (which was updated yesterday), everything renders fine. AFAIK the cache is the source of truth re: 'is it indexed?' |
next 4 depends on "strip-ansi": "4.0.0", could it be why this issue is re-appearing again? |
Is there a specific reason to use version |
A few discussions: vercel#2747 vercel#3126
What I had to do to finally make it all work: |
Any progress on this issue? |
having this problem also. did someone manage to fix it, even with a workaround? i tried @i8ramin's solution to no avail |
Try using |
I'd like to use the static page export feature of Next.js v3.0.3 however when I test in IE 11, a syntax error in the
main.js
file kills all JavaScript.You can reproduce this issue with the following:
Any advice on how to get Next.js v3 with IE 11 working would be great.
The text was updated successfully, but these errors were encountered: