简体   繁体   中英

How to install new WebView version in react native

react-native-webview": "^11.21.2"

this is version in my project

I need to install Latest version of WebView in react native

react-native-webview:11.26.0

but whenever I try to install this

npm i react-native-webview@11.26.0 or npm install react-native-webview@latest 

it's give me a error like this

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:\Users\dp312\AppData\Roaming\npm-cache\_logs\2022-12-15T17_01_21_473Z-debug.log

So how can I install a latest version of webview in react native

you can try the below command in npm:

npm install react-native-webview@11.26.0 --legacy-peer-deps

Or, delete package.lock.json and node_modules folder then run,

npm i -f

then run

npm install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM