react-native-webview": "^11.21.2"
这是我项目中的版本
我需要在react native中安装最新版本的WebView
react-native-webview:11.26.0
但是每当我试图安装这个
npm i react-native-webview@11.26.0 or npm install react-native-webview@latest
它会给我一个像这样的错误
npm install react-native-webview@latest
npm WARN eslint-plugin-react@7.12.4 requires a peer of eslint@^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native@3.6.0 requires a peer of eslint@^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! C:Usersdp312AppDataRoamingnpm-cache_logs2022-12-15T17_01_21_473Z-debug.log
那么我如何在react native中安装最新版本的webview
你可以在NPM中尝试下面的命令:
npm install react-native-webview@11.26.0 --legacy-peer-deps
或者删除package.lock.json和node_modules文件夹然后运行,
npm i -f
然后运行
npm安装