react-native-markdown-renderer icon indicating copy to clipboard operation
react-native-markdown-renderer copied to clipboard

unable to use react-native-markdown-renderer in Expo

Open min9nim opened this issue 6 years ago • 6 comments

in Expo

below error occured

The package at "node_modules/markdown-it/lib/index.js" attempted to import the Node standard library module "punycode". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq.html#can-i-use-nodejs-packages-with-expo
ERROR

Building JavaScript bundle: error

min9nim avatar Sep 27 '18 08:09 min9nim

I know that this doesn't help you. But I just installed it via yarn add react-native-markdow-renderer in expo SDK 30 and it works.

Norfeldt avatar Sep 30 '18 05:09 Norfeldt

Yep can confirm it works with Expo. We're using react-native-markdown-renderer with our Expo apps for a few months now.

cseelus avatar Nov 05 '18 13:11 cseelus

@cseelus I'm using SDK 31.0.0 and I'm not able to get this working. I'm getting this error:

Unable to resolve module punycode from -----: Module punycode does not exist in the haste module map or in these directories: ----

Any idea why this is happening to me? Thanks in advance.

rauldeheer avatar Nov 07 '18 14:11 rauldeheer

@rauldeheer Never saw that error. Currently I'm using a fork that re-enables the rendering of headings with React Native >= 0.57.4, maybe you can try that:

"react-native-markdown-renderer": "imeos/react-native-markdown-renderer#react-native-0.57.4"

cseelus avatar Nov 07 '18 15:11 cseelus

@min9nim @rauldeheer I had the same issue. I fixed it by installing punycode directly from npm:

npm install punycode

jackswiggett avatar Nov 20 '18 02:11 jackswiggett

Works for me

AdamZaczek avatar Nov 28 '18 00:11 AdamZaczek