-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Can't find private variable @derivedConstructor (Safari iOS 10.3.1) #9465
Comments
Hey @adrienharnay! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
What is the full stack trace? The Babel transform looks correct |
Hey, thanks for your answer. The rest is basic components stack trace (componentDidMount, render, render, hydrate, ...). Here is the full class if it can help:
|
This is not a fix (I'm not sure where the error comes from), but does it work for you? |
Ok, it is this bug: https://bugs.webkit.org/show_bug.cgi?id=166879 Are you using preset-env? We should update it to transpile async async functions (or classes) in broken safari releases. |
Yes that does fix it if I do class SomeClass extends React.Component {
constructor(props) {
super(props);
this.someFunction = this.someFunction.bind(this);
}
async someFunction() {
...
}
} And yes I am using preset-env (see first post for my .babelrc.js config). I only included the config related to I think the issue only appears on Safari Mobile 10.1 through 10.3.1, but I am not 100% sure. If that can help you, I can download simulators to try different iOS versions to help you target the right versions for the fix! Thanks again |
I'm not 100% sure about what is the process to update preset-env's compat data since we get them from an external source (compat-table). Maybe @existentialism can help. |
I do not know either, but can look it up if needed. Let me know if I can help with anything! |
Hey, do you have any update on this? |
@adrienharnay as @nicolo-ribaudo mentioned, we'll need to report this upstream to compat-table, as we source all our mappings from their data... mind taking the lead on that? |
Sure, created an issue on the compat-table repo: compat-table/compat-table#1419 |
@existentialism PR merged :) |
@aaronabramov next step for fixing this issue - updating |
Do you want me to do it? If so, would you mind providing me the exact commit you want me to use? :) |
Most likely after that also will be required to update some |
Alright, please tell me if I can help |
I have a PR for this, will get it up tonight or tomorrow. |
Hey I know this should be closed could it be the bug is back? Or might it have to do with other issues? |
Any update on this? We are still seeing this. |
Bug Report
Current Behavior
Can't find private variable @derivedConstructor
error on Safari iOS 10.3.1Input Code
The following code generated an error on Safari iOS 10.3.1:
before Babel:
after Babel:
Expected behavior/code
The example is working on Safari iOS 10.0 and Safari iOS 11
Babel Configuration (.babelrc, package.json, cli command)
Environment
Possible Solution
Additional context/Screenshots
Please let me know if I can help in any way!
The text was updated successfully, but these errors were encountered: