Strange error in react native sdk
# support
m
When I try to compile my app I get
Copy code
attempted to import the Node standard library module "crypto".
has anyone else run into this issue?
also do we absolutely have to run a native build and can not run in expo go? i have been dealing with dep conflicts and annoying errors all day.
v
Based on similar issues, this error might be related to Expo SDK version compatibility. The Vapi React Native SDK currently requires Expo SDK 50, so if you're using a different version (like SDK 51), try downgrading:
Copy code
json
// In package.json
"expo": "~50.0.0"
After updating, clear your cache and rebuild:
Copy code
bash
npx expo start --clear
Source: - [Discord discussion](https://discord.com/channels/1211482211119796234/1239945056937443510)
m
im using version 53 - is that not ok?
@Vapi Support Bot
v
No, Expo SDK 53 is not compatible with the Vapi React Native SDK. According to the information I found, "VAPI RN requires EXPO SDK 50 right now" and using a different version is likely causing your "crypto" module error. To fix this, downgrade to Expo SDK 50 in your package.json:
Copy code
json
"expo": "~50.0.0"
Then clear your cache and rebuild:
Copy code
bash
npx expo start --clear
Source: - [Discord discussion](https://discord.com/channels/1211482211119796234/1239945056937443510)
k
Use React Native-compatible libraries, polyfills like react-native-crypto, or switch to alternatives like ethers.js to fix it.
m
hey @Kings_big💫 not sure this hits my issue as I didnt install axios and it seems to be a dependency to whatever vapi is using. tldr im running into versioning and dependency issues and its pretty frustrating as i just want to get going.
can you hop on a VC?
k
Cc: @Shubham Bajaj
3 Views