-
Notifications
You must be signed in to change notification settings - Fork 24.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
ReferenceError: Can't find variable: BigInt #28492
Comments
|
Same issue here. |
BigInt is one of the new feature of the ECMAScript 2020, and I think react native does not support latest ECMAScript. |
Same issue here. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
NOOO VERY BAD @stalebot |
I have the same issue |
Same Issue here! |
Try to add the My
My
I fixed it in this way |
@vitolipari thank you for posting the possible solution. I tried adding the suggested plugin but still getting the same error. Would you mind sharing the |
this is a part of my
|
This should be addressed. It makes some library (like ripple-lib) to behave inconsistently depending on iOS / android. |
I also have the same issue. Adding the
|
I m having same issue is there any solution |
Need a solution for this. I am also facing it. |
If you are still having this problem, here is how I solved it. You are importing a package somewhere that requires BigInt as a dependency. For the most part RN uses JavaScriptCore which may not have the support of BigInt. Okay, so one of your dependencies requires Bigint and it needs to be shim'ed. Your project probably relates to crypto and you are probably using rn-nodeify to shim the packages that you need. You have a 1. Add big-integer to your list of dependencies:
2. Add a reference in shim.jsIn your
See this commit for the implementation. update Aug 13, 2021: Updated to use the correct package import, sorry about that. |
@jessgusclark Thanks, that worked! |
your solution got me past the big int issue, but it introduced another issue |
Hey @Jarrio, glad that moved you slightly forward. This error does not look to be related to the issue here, rather perhaps, data that is in an incorrect format from the API, or being converted incorrectly in your project (or dependency). I'd take a look at the stack, where this is happening. I wonder if the |
What version of JSC is react-native currently using? It looks like JSC does support BigInt now, at least the one on my box does. (MacOS 10.6, Safari 15.0) |
I am trying to use the library which I used at web frontend development.
But when I am trying to use that library, it says
ReferenceError: Can't find variable: BigInt
BigInt
is a javascript built-in library, and I am not sure why React Native does not support, or React native does not support all new features of ES2020?Binaries:
Node: 12.15.0
Yarn: 1.22.0
npm: 6.13.4
Watchman: 4.9.0
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0
react-native: 0.61.5
The text was updated successfully, but these errors were encountered: