react-native-file-type icon indicating copy to clipboard operation
react-native-file-type copied to clipboard

Can't import without errors...

Open hrag opened this issue 6 years ago • 1 comments

I can't even import this library without seeing this error:

Cannot read property 'RNFSFileTypeRegular' of undefined

I've properly installed and linked react-native-fs, followed instructions thoroughly 3x.

Import looks like this:

import fileType from 'react-native-file-type';

Any ideas? This would be really useful, and should save me a big hassle using just 'file-type'

hrag avatar Feb 18 '19 20:02 hrag

Thanks @hrag for raising the issue.

Based on shared information, I believe, you are using RNFS -> 3.0 and above. Personally I have tested only on 2.x

Looks like it is the problem within RNFS. Could you please check their repository -> issues, if anyone else might have faced the similar issue.

If you find any solution, please share it with us as well.

Thanks </ Pranav >

prscX avatar Feb 19 '19 16:02 prscX