helium / maker-starter-app

Apache License 2.0
37 stars 39 forks source link

ReferenceError: Property 'BigInt' doesn't exist, js engine: hermes #62

Open jackz123 opened 1 year ago

jackz123 commented 1 year ago

Hi Teams When I upgraded @helium/react-native-sdk version from 1.0.0 to 2.0.14, I got this error (ReferenceError: Property 'BigInt' doesn't exist, js engine: hermes ). Is there a solution now?

Error: Requiring module "node_modules/@helium/react-native-sdk/src/index.tsx", which threw an exception: ReferenceError: Property 'BigInt' doesn't exist, js engine: hermes

image image image

zhaichenyang001 commented 1 year ago

Project can't be compiled,Can you fix that,The issue as follows: warning " > @helium/react-native-sdk@2.0.14" has incorrect peer dependency "@helium/crypto-react-native@^3.9.0". warning " > @helium/react-native-sdk@2.0.14" has incorrect peer dependency "@helium/currency@^3.25.1". warning " > @helium/react-native-sdk@2.0.14" has incorrect peer dependency "@helium/http@^3.43.0". warning " > @helium/react-native-sdk@2.0.14" has incorrect peer dependency "@helium/transactions@^3.38.0". warning " > @helium/react-native-sdk@2.0.14" has unmet peer dependency "events@^3.3.0". warning " > @helium/react-native-sdk@2.0.14" has incorrect peer dependency "h3-js@^3.7.2". warning " > @helium/react-native-sdk@2.0.14" has unmet peer dependency "react-native-crypto@^2.2.0". warning " > @helium/react-native-sdk@2.0.14" has incorrect peer dependency "react-native-sodium@^0.3.9". warning " > @helium/react-native-sdk@2.0.14" has unmet peer dependency "readable-stream@^3.6.0". warning "@helium/react-native-sdk > react-native-crypto@2.2.0" has unmet peer dependency "react-native-randombytes@>=2.0.0 <4.0.0". warning " > @helium/wallet-link@4.10.0" has unmet peer dependency "@helium/crypto@^4.3.1". warning " > @react-native-mapbox-gl/maps@8.5.0" has unmet peer dependency "prop-types@>=15.5.8". warning " > @react-navigation/stack@5.14.9" has unmet peer dependency "@react-native-community/masked-view@>= 0.1.0". warning " > redux-thunk@2.4.2" has unmet peer dependency "redux@^4". warning "expo-splash-screen > @expo/prebuild-config@5.0.7" has unmet peer dependency "expo-modules-autolinking@>=0.8.1". warning "expo-camera > @koale/useworker@4.0.2" has incorrect peer dependency "react@^16.8.0". warning "react-native > react-native-codegen > jscodeshift@0.13.1" has unmet peer dependency "@babel/preset-env@^7.1.6". warning " > react-native-appstate-hook@1.0.6" has incorrect peer dependency "react@^16.8.0". warning " > react-native-appstate-hook@1.0.6" has incorrect peer dependency "react-native@^0.59.0". warning " > use-state-with-callback@2.0.5" has unmet peer dependency "react-dom@>=16.8.0". warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "@typescript-eslint/eslint-plugin@2.x". warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "@typescript-eslint/parser@2.x". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "babel-eslint@10.x". warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "eslint@6.x". warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "eslint-plugin-flowtype@3.x || 4.x". warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "eslint-plugin-react-hooks@1.x || 2.x". [4/4] Building fresh packages... [-/9] ⠐ waiting... [2/9] ⠐ bigint-buffer [-/9] ⠐ waiting... [-/9] ⠐ waiting... error D:\MyProject\ugApplication\maker-starter-app-main\node_modules\@helium\react-native-sdk: Command failed.

jackz123 commented 1 year ago

Error reported by the latest code (as shown below) image

matthewcarlreetz commented 1 year ago

@jackz123 In android/app/build.gradle can you enable Hermes? You will need to clean the project and possibly delete the app.

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]
jackz123 commented 1 year ago

I tried and there is still an error, the error log is as follows:

: Error: Unable to resolve module react-native-quick-crypto from /Users/work/react-native/maker-starter-app/node_modules/@noble/ed25519/lib/index.js: react-native-quick-crypto could not be found within the project or in these directories: node_modules

1 | "use strict"; 2 | /! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) / 3 | Object.defineProperty(exports, "__esModule", { value: true }); 4 | exports.utils = exports.curve25519 = exports.getSharedSecret = exports.sync = exports.verify = exports.sign = exports.getPublicKey = exports.Signature = exports.Point = exports.RistrettoPoint = exports.ExtendedPoint = exports.CURVE = void 0; at ModuleResolver.resolveDependency (/Users/work/react-native/maker-starter-app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:178:15) at DependencyGraph.resolveDependency (/Users/work/react-native/maker-starter-app/node_modules/metro/src/node-haste/DependencyGraph.js:264:43) at Object.resolve (/Users/work/react-native/maker-starter-app/node_modules/metro/src/lib/transformHelpers.js:170:21) at resolveDependencies (/Users/work/react-native/maker-starter-app/node_modules/metro/src/DeltaBundler/graphOperations.js:466:33) at processModule (/Users/work/react-native/maker-starter-app/node_modules/metro/src/DeltaBundler/graphOperations.js:232:31) at async addDependency (/Users/work/react-native/maker-starter-app/node_modules/metro/src/DeltaBundler/graphOperations.js:361:18) at async Promise.all (index 2) at async processModule (/Users/work/react-native/maker-starter-app/node_modules/metro/src/DeltaBundler/graphOperations.js:279:3) at async addDependency (/Users/work/react-native/maker-starter-app/node_modules/metro/src/DeltaBundler/graphOperations.js:361:18) at async Promise.all (index 9)

matthewcarlreetz commented 1 year ago

Can you update @helium/react-native-sdk to the latest? "@helium/react-native-sdk": "^2.0.18"

jackz123 commented 1 year ago

Yes, I have updated to "^2.0.18" and executed : rm -fr node_modules && yarn cache clean && yarn install But the problem still exists.

image

jackz123 commented 1 year ago

I also clean the project and delete the app, but the problem still exists I pulled the latest code

image

matthewcarlreetz commented 1 year ago

are there any references to react-native-quick-crypto in your project? If so, remove them then run yarn start --reset-cache

jackz123 commented 1 year ago

There is no reference to react-native-quick-crypto in the code, but I re-imported react-native-quick-crypto, and configured babel, and it can run now

image