ageitgey / node-unfluff

Automatically extract body content (and other cool stuff) from an html document
Apache License 2.0
2.15k stars 223 forks source link

Cannot use client-side with React Native #74

Closed joncursi closed 7 years ago

joncursi commented 7 years ago

After installing the module into my react native app, I get:

screen shot 2017-04-27 at 12 50 23 pm

I tried manually adding fs to package.json to make sure it's there in the module map, but same error. Is it possible to use this library client-side in an RN app?

ageitgey commented 7 years ago

No, this library only works server-side.

However there are some open PRs that modify this library to work client-side like #68. I just haven't merged them because this library was never really designed to work client-side and requires data files that might be slow/too large to "bake in" to the code like that PR does.

joncursi commented 7 years ago

Okay, thank you for the info!

JulianKingman commented 7 years ago

@joncursi fs doesn't work on react native, did you try using this? https://github.com/itinance/react-native-fs I think you'll have to modify references to fs and replace them with react-native-fs, but you could probably get it to work.