Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native: Pod install leads to different versions in podfile.lock than package.json

I just did a clean clone of my repo, did npm install and then pod install in the ios/ directory. This leads to a change in my Podfile.lock, which seemed to have upgraded a couple of modules to a newer version than what is specified in the package.json for that corresponding module, for example:

Podfile.lock:

-  - react-native-webview (8.1.0):
+  - react-native-webview (8.2.1):

package.json:

"react-native-webview": "^8.1.0",

I would like to understand why this happens and whether this is a problem. I would avoid this but I can't do npm run ios, because it says that there are version issues and I have to run pod install.

like image 605
ffritz Avatar asked Nov 07 '22 08:11

ffritz


1 Answers

When i get deep issues with Podfile/package.json, i do something like that:

  1. Delete ./node_modules;
  2. Delete package-lock.json and Podfile.lock;
  3. Set a fixed version to component: "^8.1.0" -> "8.1.0" [w/o ^];
  4. Do the npm install then pod install.
like image 189
Maycon Mesquita Avatar answered Nov 15 '22 12:11

Maycon Mesquita