-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Failing to load the file in IE #1328
Comments
Same here on |
We reverted back to 2.2.0 and it is woking fine. |
I also reverted to 2.2.0 and it works fine. Seems like the code exported by the module is not valid ES5. |
Well, it shoud have been transpiled by babel... I'll take a look at this.
Le jeu. 26 sept. 2019 à 11:09, orangejuice <notifications@github.com> a
écrit :
… I also reverted to 2.2.0 and it works fine.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1328?email_source=notifications&email_token=ADDNSFI5LWY4MJXY24WZNNLQLR333A5CNFSM4I2MYYBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7U4IVQ#issuecomment-535413846>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADDNSFNC7OUW4Z3BEWLSNRLQLR333ANCNFSM4I2MYYBA>
.
|
This happened after updating debug from v3 to v4 which uses spread operator in its distributable. |
Got this in IE11 as well.
Affected lines
Don't really have much to add as it's been identified as non transpiled code. |
and iOS9 Safari |
This is a breaking change on a point release that we got automatically upgraded too. For those who still support IE11 this is quite serious, took us a few days to realise. |
How long do you expect to take them to fix the issue? |
this issue is related to fix for |
Unfortunately, it seems like the maintainer of |
Hi @darrachequesne :) Can you please pin the |
In the mean time I tried to approach the maintainer of |
I've heard the problem a thousand times. I've heard it since the problem was first created. Please transpile your application if you want it to work on archaic browsers;
This doesn't mean package maintainers should keep their code pinned to the stone ages. The javascript ecosystem is slow, yes, but it's even slower when e.g. IE11 keeps us held back. The reason why If you don't believe me, manually transpile If you have a problem with Babel's efficiency, open an issue at Babel. If you have a problem with CRA not performing proper transpilation, open an issue with CRA. I don't want to come off as dismissive; this just isn't |
From what they say in this link here. It seems to be a babel configuration problem, maybe if the staff changes the configuration inside the socket-io-client it can solve the problem. |
Correct; that is the official response from the Babel team. Please take your issues there. |
What official response? Linked issue was about babel not transpiling selected packages from node_modules when configured to, and it's fixed. Socket.io-client doesn't even use babel for transpiling. It only uses webpack to bundle all dependencies into a single distributable. So now, if socket.io-client is to be supported in older browsers it needs either a transpilation step while building or it needs to downgrade or replace debug. Publishing packages for web that need transpilation is actually not that common. Over the years of transpiling i encountered it only a few times even on projects with literally GBs of dependencies in node_modules. Until now every maintainer was nice enough to treat it as a bug... |
This is the response I was referring to:
Correct. That is the state of modern web development.
This is the real problem. Not
Using perfectly valid versions of Javascript is not a bug. |
Saying transpile node_modules instead of publishing a package that supports as many active environments as possible is such a middle finger to anyone running a business. |
That's not really a constructive attitude, and not the kind of discourse I'd like to have in open source, personally. I think I've said my piece here. Sorry my decision to improve the maintainability of a module downloaded nearly 60 million times a week doesn't fit your business model. |
the problem in this case is more thaht companies using ie11 massive, after my logs 25% of my visitors come by ie. I would like to show the middle finger to ie but when u run a business u cant send them to hell because u want there money :) |
What is the current workaround for this issue? |
2.2.0 when u can after fmoessle |
Took me 3 days to find out the bug was coming from Me too I downgrade module version to 2.2.0 cheers all |
Downgrading to 2.2.0 worked for me as well. Thanks. |
Maybe a good solution is to switch socket.io to this fork of debug debug-es5 that is transpiled to es5. I've spent an entire day trying to get babel and webpack to transpile debug/src/browser.js and from the many threads I've stumbled on it seems like a lot of people are running into this too. Seems like a lot of engineering time that could be saved. By the way, socket.io v2.2.0 has a memory leak that was fixed in 'ws' v7.1.2 (websockets/ws#1617) so be careful downgrading. Edit: got it fixed Instead, I just installed
|
I am using:
|
changing socket.io-client to 2.2.0 works for me but only after building and starting the application. in dev mode I still get the error TypeError: Object doesn't support property or method 'cbrt' |
This saved me hours of work - thank you! |
I have created a very small repo with this issue solved with basic Webpack configuration: https://github.com/kmaraz/debug-to-es5 |
The Please note that you can also use the webpack-remove-debug plugin, in order to remove any call to the debug dependency (until we find a proper way to provide a build with and without debug). |
This is an old issue but I need to add this, even with 'webpack-remove-debug' I still failed to make 4.x work on IE 11. I have gave it up, don't think worth effort any more. 😱
|
@qiulang please check our own webpack configuration: https://github.com/socketio/socket.io-client/blob/master/support/webpack.config.js |
This does not work for me, I found that babel/core also uses debug@4 |
t.log = function(...e) {
return "object" == typeof console && console.log && console.log(...e)
}
this code fails to execute in IE11.
Expected Identifier error.
The text was updated successfully, but these errors were encountered: