tradle / react-native-crypto

partial implementation of node's `crypto` for react-native
MIT License
372 stars 84 forks source link

Have errors with build. #58

Open l1m0nguy opened 4 years ago

l1m0nguy commented 4 years ago

Good morning!

Build troubles with macOS. Installed like this:


react-native init simplepr;
cd simplepr;
npm i --save react-native-crypto;
npm i --save react-native-randombytes;
# react-native link react-native-randombytes --- create error 
# "React Native CLI uses autolinking for native-depencies"
npm i --save-dev rn-nodeify@latest;
./node_modules/.bin/rn-nodeify --hack --install;

After this


cd ios;
pod install;
cd ..;

Adding in index.js:


import './shim.js';

and adding in App.js:


import crypto from 'crypto';
console.log(crypto.createHash('sha256').update('hell').digest('hex'));

Run react-native run-ios and have linker error:


Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65.

...

The following commands failed:
Ld *path to app*
l1m0nguy commented 4 years ago

idk why it's happen, because under linux (when building android apk) i have no problem with it

l1m0nguy commented 4 years ago

I forgot about version:


react-native-cli: 2.0.1,
react-native: 0.62.2,
react-native-crypto: 6.13.4,
react-native-randombytes: 6.13.4
datle1888 commented 4 years ago

same here, what's wrong?

l1m0nguy commented 4 years ago

is smth wrong with me or with library?

l1m0nguy commented 4 years ago

@mvayngrib

l1m0nguy commented 4 years ago

ping

l1m0nguy commented 4 years ago

@datle1888 could you write your problem? Maybe this could help

stonebinox commented 3 years ago

@l1m0nguy did you resolve this? If so, what did you do? Been with this problem for a while now!

emdeutsch commented 3 years ago

I have the same problem... has anyone figured it out?

gkasireddy202 commented 2 years ago

How to use below code?

./node_modules/.bin/rn-nodeify --hack --install