5

here is the version Old Version => "react-native-webview": "^11.17.2", New Version => "react-native-webview": "^11.18.0"

I am using webview to render html but it requires or depend on an other lib

react-native-test-app

here is the warning I got


warn Package react-native-webview has been ignored because it contains invalid configuration. Reason: Cannot find module 'react-native-test-app/package.json'

Require stack:

  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/react-native-webview/react-native.config.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/import-fresh/index.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/cosmiconfig/dist/loaders.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/cosmiconfig/dist/createExplorer.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/cosmiconfig/dist/index.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/@react-native-community/cli/build/tools/config/readConfigFromDisk.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/@react-native-community/cli/build/tools/config/index.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/@react-native-community/cli/build/commands/install/install.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/@react-native-community/cli/build/commands/index.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/@react-native-community/cli/build/index.js
  • /Volumes/companyData/Meta_Quiz_App_ReactNative/node_modules/react-native/cli.js

when I install this

npm i react-native-test-app

then its work fine for android but for ios it causing pods issue. if I go back to old version it is still exists. Thanks in advance please waiting for your help

Shafqat Bari
  • 382
  • 1
  • 3
  • 12
  • do you have a package.json file in your react-native-test-app directory? Seems like that is what the error message is saying the issue is. – Ross Mar 31 '22 at 15:41

3 Answers3

2

Seems like version 11.18.0 is buggy and this issue provokes problems on the linking. The recomendation for now is to downgrade 11.17.2, you can read more at their git repo related issues & 2430

Charlie
  • 992
  • 8
  • 19
  • I downgrade this its working for android and ios both. Thanks for sharing those links but this warning still exists – Shafqat Bari Apr 01 '22 at 07:43
2

Upgrade your package version as this issue has been resolved in version 11.18.1.

https://github.com/react-native-webview/react-native-webview/releases/tag/v11.18.1

Jason Jin
  • 1,739
  • 14
  • 21
-1

11.18.0 This version doesn't work very well.

11.17.2 This version doesn't work very well.

I use 11.15.0

yarn remove react-native-webview

yarn add react-native-webview@11.15.0

cd ios

pod install

Yarn Version List

Steven Gardner
  • 234
  • 3
  • 9