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
undefined is not a function(evaluation 'object.getOwnPropertyDescriptors(arguments[i])') #10166
Comments
Hey @gsklee! 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 |
I'm confirming the issue is on Babel side, I have the same issue. To reproduce with an example you can do the following :
I am pretty sure this is the plugin-proposal object-rest-spread since the generated code is as follows :
This was probably introduced here : #9384 |
Same issue |
1 similar comment
Same issue |
Same issue. |
We're also having a hard time because of this as well. |
resolve.modules: ["node_modules", "web_modules"] web_modules not work for @bable/core version v7.5.0, import any module from web_modules to invoke will be undefined. |
Fixed locking |
@gorkalaucirica Can you please share your entire package.json here ? |
issue same here in combination with IE11 |
Is just a missing core js polyfill that needs to be added to babel runtime: |
A hotfix would be to add the following to your import 'core-js/modules/es6.object.get-own-property-descriptors';
|
Note that Babel works in node >=6, but it's output should work in older engines |
Is a missing polyfill somewhere in babel runtime. |
Still I get issue. my package.json looks like :
Using react-native v0.57.7 |
Please fix this issue. Very annoying. Cant fix :( |
Have you tried to update to 7.5.1? |
still the same issue |
Great we can make a release very soon then! Thanks for all your patience everyone! We are all learning here (and also I believe Nicolò is studying for exams even). I think we can do a writeup on some of the issues we've encountered here later as well, and hopefully that's useful to everyone.
|
All good for us, as we had a proper workaround while waiting for a proper fix. |
Published as 7.5.4! |
thank you @nicolo-ribaudo It's working for us |
@nicolo-ribaudo
When I try to "overload" the 'someAction' variable I get an runtime error which I can inspect via logcat (android logs used on my react-native app) looking something like this:
If I don't "overload" the variable and instead try to do something like this I guess it has something to do with how the babel helper handles the arguments and/or the export/imports. thanks for your help sofar |
This seem an unrelated issue. |
@nicolo-ribaudo |
Hi guys ! To solve it, I've to fix redux version to 4.0.0 : Maybe there is a link with babel ? I think, because it's the same issue with declaration of |
I'm still finding edit: I found it was dying when a second spread existed on the same page. I tried creating a minimal-case reduction and it worked just fine. Huh? So I brought that minimal case back to the same folder as the original repo and it failed, even after removing Leaving this note here in case anyone finds a similar issue remaining, hope it helps. |
@JordanProtin It's because redux updated the Babel version to the buggy one; in 4.0.4 it's fixed. |
Thank you for your answer @nicolo-ribaudo |
Hey @nicolo-ribaudo, thanks again for all your help on this. This issue was resolved for us 2 days ago, and we were able to continue working on our React Native app. However we just pushed our app.aab to the Google Play Store for internal testing, and the app crashes when downloaded from the play store, despite it working fine when running on simulators and devices not through the play store. It's the original error of "undefined is not a function(evaluation 'Object.getOwnPropertyDescriptors(arguments[i])')". @babel/core and @babel/runtime and @babel/helpers and everything are all at 7.5.4 in our lockfile, and I looked at the lines of code in that /@babel/helpers/lib/helpers.js file that you made changes to in previous PRs, and I can't find any instances of the function supposedly causing the error with arguments[i] as the argument (as I recall you changed that to "source" each time). So it makes sense that I can't find it, but odd that the error finds it. Any insight on this is appreciated! |
Maybe for some reason it still used an old version of Babel when building the APK? Maybe there is a "production cache"? (ALERT: I have never created an android app) |
this solved the caching problem and after that it used the new version of Babel. yarn: watchman watch-del-all && |
Hi guys, does anyone fix it? |
Yes, v7.5.4 |
@nicolo-ribaudo "devDependencies": { I've changed and run npm install again then react-native run-android but still occur that error :( |
What's your |
I have same issue.
|
@nicolo-ribaudo Alright. Thanks a lot. I've to restart my PC and it works ;) |
@AkioUnity change babel version to 7.5.4 like @nicolo-ribaudo said :) |
7.5.5 should work too. @AkioUnity Please check in your lockfile that you don't have an older |
Yes. it is working fine now. |
facebook/react-native#23092
Unfortunately this exact same issue strikes again with the release of Babel v7.5.0.
These are the Babel related dependencies I am having:
With the
package-lock.json
I generated a few days ago everything's fine withnpm install
, but if I try to do it without the lockfile the error appears. Judging from my lockfile's diff I can say that a few secondary Babel dependencies were updated to v7.5.0 without the lockfile (eg.@babel/generator
,@babel/helper-create-class-features-plugin
) so am pretty sure this is a Babel issue again.The text was updated successfully, but these errors were encountered: