0

In my current react-native app, I have a dependency that uses "crypto" module.

It appears that on Mac, everything runs fine. But on Windows, I get a requiring unknown module "crypto".

I tried using rn-nodeify but it doesn't seem to help.

clami219
  • 2,958
  • 1
  • 31
  • 45
Zhen Liu
  • 7,550
  • 14
  • 53
  • 96
  • `npm install crypto`? – Maxwelll Oct 26 '16 at 02:48
  • @MaxwellLasky I wish it is that simple =( – Zhen Liu Oct 26 '16 at 14:11
  • what version of NodeJS do you have installed on Mac, and what version on Windows? This sound suspiciously like an older version got installed on Windows. – Matt Hargett Jun 14 '17 at 22:18
  • I have a similar question [*Howto patch/shim crypto.getRandomValues for React Native*](https://stackoverflow.com/q/45301900/8295283), that - when answered - will also answer this question. **PS** Instead of `rn-nodeify` I use the cleaner method provided by [`ReactNativify`](https://github.com/philikon/ReactNativify). – Arnold Schrijver Jul 25 '17 at 12:44

0 Answers0