react-native-jwt icon indicating copy to clipboard operation
react-native-jwt copied to clipboard

Cannot read property 'split' of undefined

Open RyanMitchellWilson opened this issue 8 years ago • 2 comments

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

RyanMitchellWilson avatar Feb 06 '17 23:02 RyanMitchellWilson

👍 having this same issue. Any fixes?

treffiletti avatar Mar 01 '17 02:03 treffiletti

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.

brascene avatar Mar 15 '17 09:03 brascene