react-native-jwt
react-native-jwt copied to clipboard
Cannot read property 'split' of undefined
I just followed all the instructions and everything seemed to work right but as soon as I imported jwt I started getting the error Cannot read property 'split' of undefined
I've tried using multiple ways to import but none of them appear to be working:
import jwt from 'react-native-jwt'
import { jwt } from 'react-native-jwt'
const jwt = require('react-native-jwt')
Using React-Native 0.41.0
👍 having this same issue. Any fixes?
Hi, I've had the same issue, and the error was that shim.js file wasn't created in my project root. Therefore I did this:
- rn-nodeify --install --hack in my project
- add import shim from 'your_root/shim'
- restart react-native packager
Hope this helps.