Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native-pdf iOS and Android build errors

Tried to create build in iOS and Android. App is using react-native-pdf library. Getting build errors

Error: Unable to resolve module react-native-blob-util from /Users/runner/work/1/s/node_modules/react-native-pdf/index.js: react-native-blob-util could not be found within the project or in these directories: node_modules ../../node_modules

We tried adding react-native-blob-util to package.json. But now getting duplicate symbols build error in iOS, because of react-native-blob-util

"react-native-blob-util": "^0.13.16", "react-native-pdf": "^6.4.0"

like image 292
Harish Kumar Kailas Avatar asked Nov 15 '22 18:11

Harish Kumar Kailas


1 Answers

i get this case too and the best way is

  1. uninstall react-native-blob-util and react-native-pdf
npm uninstall react-native-blob-util
npm uninstall react-native-pdf
  1. install react-native-pdf version to 6.2.0

npm install [email protected]

  1. install rn-fetch-blob, or if you already have

npm i rn-fetch-blob

  1. npm install
like image 132
Dicka Reynaldi Avatar answered Jan 13 '23 19:01

Dicka Reynaldi