Cretezy / redux-persist-expo-securestore

redux-persist storage for Expo's SecureStore
MIT License
74 stars 28 forks source link

Getting error _expo.SecureStore.removeItemAsync is not a function #4

Closed osdiab closed 5 years ago

osdiab commented 6 years ago

This seems to occur when I install via:

yarn add redux-persist-expo-securestore

It looks like it was changed in the source, but maybe that wasn't updated in npm? Thanks!

Cretezy commented 6 years ago

That's odd. The error is showing that it's Expo's fault, can you provide a full error log and reproducable code sample?

osdiab commented 6 years ago

Yeah, the error is below from the simulator, you can make it happen by calling persistor.purge().

It's worth noting that if you look at the library's index.js in node_modules, you'll see it's calling removeItemAsync, but if you look at the source code in master, it calls deleteItemAsync, which is consistent with the Expo docs. Additionally, in node_modules it says the version of the library is 1.0.0, but master here is 0.1.0. Looks like the repo has diverged from what's distributed in NPM.

screen shot 2018-06-07 at 6 28 20 pm
osdiab commented 6 years ago

All you need to do to see the erroneous code is to initialize a node package and install the library, then look in node_modules and you'll see it's messed. Alternatively look at what's tagged as 1.0.0 in this repo and it's wrong too.

Cretezy commented 6 years ago

Yeah there's definitely something funky going on. I'll take a look soon.

skibz commented 5 years ago

It appears as though a new version was published. Does this mean this issue is resolved?

Cretezy commented 5 years ago

This should be fixed once https://github.com/Cretezy/redux-persist-expo-securestore/pull/8 is merge

Cretezy commented 5 years ago

I've just published v2.0.0 with #8. Please test again and open if is it still broken