jaycee
jaycee

Reputation: 311

remove references of a module in react native

I am stuck with an odd problem, I am trying to get rid of react-native-pdf so

Problem now is that when I try to run my app is giving me this error enter image description here

and my terminal look like this enter image description here

did I miss to do somenthing?

Upvotes: 2

Views: 3046

Answers (1)

Robo-Rin
Robo-Rin

Reputation: 210

Not quite sure about iOS, but for Android here are a few things you can check as react-native unlink sometimes doesn't unlink it properly:

android/settings.gradle

Delete any includes and project declarations to ':react-native-pdf'

android/app/build.gradle

Delete any compile declarations to ':react-native-pdf' under "dependencies"

android/app/src/main/java/com/[your_app_name]/MainApplication.java

In the getPackages() method, make sure you delete any references to ':react-native-pdf' such as new ReactNativePdfPackage() or something similar. You may also have to delete any related imports.

Hope this helps!

Upvotes: 5

Related Questions