包react-native-webview已被忽略,因为它包含无效的配置

Sha*_*ari 5 javascript react-native react-native-webview

这是版本旧版本=>“react-native-webview”:“^11.17.2”,新版本=>“react-native-webview”:“^11.18.0”

我正在使用 webview 渲染 html,但它需要或依赖于其他库

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'
Run Code Online (Sandbox Code Playgroud)

需要堆栈:

  • /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

当我安装这个时

npm i react-native-test-app
Run Code Online (Sandbox Code Playgroud)

那么它在 Android 上工作正常,但在 ios 上会导致 Pod 问题。如果我回到旧版本它仍然存在。预先感谢,请等待您的帮助

Cha*_*lie 2

似乎版本11.18.0有错误,并且此问题会引发链接问题。目前的建议是降级 11.17.2,您可以在他们的git repo 相关问题& 2430中阅读更多内容