mockingbot / react-native-zip-archive

Zip archive utility for react-native
MIT License
420 stars 154 forks source link

Undefined is not an object on unzip() - Android #288

Closed marcopacurariu3 closed 12 months ago

marcopacurariu3 commented 1 year ago

Hello,

I'm having an expo managed project and I installed multiple 6.0.x versions and I keep getting: [TypeError: undefined is not an object (evaluating '_reactNativeZipArchive.default.unzip')]

I'm using react-native 0.69.6

I keep reading that the auto linking function might not work, but how is that possible? I installed the library by using:

npm install react-native-zip-archive --save

I'm not using expo directly, it's happening once I am running: npx expo run:android -d SM_G980F and checking it on Android.

What should I do?

Thank you!

marcopacurariu3 commented 12 months ago

Figured it out, I was using the following import:

import ZipArchive from 'react-native-zip-archive'; but I should have used:

import { unzip } from "react-native-zip-archive";