-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Fix babelHelpers.typeof is not a function #11093
Conversation
By analyzing the blame information on this pull request, we identified @yungsters to be a potential reviewer. |
For other who had this packager error: I was having this issue due to a symlinked module that has it's own .babelrc and is not transformed. The module's babelrc specifies This PR change resolved the issue for me, would love to see this merged! |
What does it take to get this PR merged? |
Thanks @cmcewen, this problem has been popping up all the time |
@cmcewen Anything we can do to help get this merged? |
I'm not sure - looks like @janicduplessis did some work on this file a while back? |
babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { | ||
return typeof obj; | ||
} : function (obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an obj !== Symbol.prototype
comparison too? See https://github.com/babel/babel/blob/master/packages/babel-helpers/src/helpers.js#L8
@facebook-github-bot shipit |
Summary: We started encountering the error described in facebook#5747 (`babelHelpers.typeof is not a function) after switching from npm to yarn. [This comment](facebook#5747 (comment)) led to [this comment](facebook#4844 (comment)) which contains a solution we've been using successfully in our production app. Maybe I didn't look in the right place but it doesn't seem anyone had actually PR'd this change before (if so and I didn't find it, I apologize). An alternative solution it seems is to add a [different .babelrc](http://stackoverflow.com/questions/35563025/new-react-native-app-has-typeerror-babelhelpers-typeof-is-not-a-function-ios), but this seems easier to me. Closes facebook#11093 Differential Revision: D4353977 fbshipit-source-id: 3e45de29ef5d0e046219a32df6530dcf838b9fd9
Summary: We started encountering the error described in facebook#5747 (`babelHelpers.typeof is not a function) after switching from npm to yarn. [This comment](facebook#5747 (comment)) led to [this comment](facebook#4844 (comment)) which contains a solution we've been using successfully in our production app. Maybe I didn't look in the right place but it doesn't seem anyone had actually PR'd this change before (if so and I didn't find it, I apologize). An alternative solution it seems is to add a [different .babelrc](http://stackoverflow.com/questions/35563025/new-react-native-app-has-typeerror-babelhelpers-typeof-is-not-a-function-ios), but this seems easier to me. Closes facebook#11093 Differential Revision: D4353977 fbshipit-source-id: 3e45de29ef5d0e046219a32df6530dcf838b9fd9
Summary: We started encountering the error described in facebook#5747 (`babelHelpers.typeof is not a function) after switching from npm to yarn. [This comment](facebook#5747 (comment)) led to [this comment](facebook#4844 (comment)) which contains a solution we've been using successfully in our production app. Maybe I didn't look in the right place but it doesn't seem anyone had actually PR'd this change before (if so and I didn't find it, I apologize). An alternative solution it seems is to add a [different .babelrc](http://stackoverflow.com/questions/35563025/new-react-native-app-has-typeerror-babelhelpers-typeof-is-not-a-function-ios), but this seems easier to me. Closes facebook#11093 Differential Revision: D4353977 fbshipit-source-id: 3e45de29ef5d0e046219a32df6530dcf838b9fd9
Summary: We started encountering the error described in facebook#5747 (`babelHelpers.typeof is not a function) after switching from npm to yarn. [This comment](facebook#5747 (comment)) led to [this comment](facebook#4844 (comment)) which contains a solution we've been using successfully in our production app. Maybe I didn't look in the right place but it doesn't seem anyone had actually PR'd this change before (if so and I didn't find it, I apologize). An alternative solution it seems is to add a [different .babelrc](http://stackoverflow.com/questions/35563025/new-react-native-app-has-typeerror-babelhelpers-typeof-is-not-a-function-ios), but this seems easier to me. Closes facebook#11093 Differential Revision: D4353977 fbshipit-source-id: 3e45de29ef5d0e046219a32df6530dcf838b9fd9
Summary: We started encountering the error described in #5747 (`babelHelpers.typeof is not a function) after switching from npm to yarn. [This comment](facebook/react-native#5747 (comment)) led to [this comment](facebook/react-native#4844 (comment)) which contains a solution we've been using successfully in our production app. Maybe I didn't look in the right place but it doesn't seem anyone had actually PR'd this change before (if so and I didn't find it, I apologize). An alternative solution it seems is to add a [different .babelrc](http://stackoverflow.com/questions/35563025/new-react-native-app-has-typeerror-babelhelpers-typeof-is-not-a-function-ios), but this seems easier to me. Closes facebook/react-native#11093 Differential Revision: D4353977 fbshipit-source-id: 3e45de29ef5d0e046219a32df6530dcf838b9fd9
We started encountering the error described in #5747 (`babelHelpers.typeof is not a function) after switching from npm to yarn. This comment led to this comment which contains a solution we've been using successfully in our production app.
Maybe I didn't look in the right place but it doesn't seem anyone had actually PR'd this change before (if so and I didn't find it, I apologize).
An alternative solution it seems is to add a different .babelrc, but this seems easier to me.