react-native-web-webview icon indicating copy to clipboard operation
react-native-web-webview copied to clipboard

npm install fails

Open Naphier opened this issue 4 years ago • 1 comments

Log:

D:\Repos\naplandsite>npm install react-native-web-webview --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"16.13.1" from the root project
npm ERR!   peer react@">=16.5.1" from [email protected]
npm ERR!   node_modules/react-native-web
npm ERR!     react-native-web@"^0.13.18" from the root project
npm ERR!     peer react-native-web@"*" from [email protected]
npm ERR!     node_modules/react-native-web-webview
npm ERR!       react-native-web-webview@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.14.0" from [email protected]
npm ERR! node_modules/react-dom
npm ERR!   react-dom@"^16.13.1" from the root project
npm ERR!   peer react-dom@">=16.5.1" from [email protected]
npm ERR!   node_modules/react-native-web
npm ERR!     react-native-web@"^0.13.18" from the root project
npm ERR!     1 more (react-native-web-webview)
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\napla\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\napla\AppData\Local\npm-cache\_logs\2021-03-09T21_51_57_076Z-debug.log

package.json:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^12.0.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/bottom-tabs": "5.11.2",
    "@react-navigation/material-top-tabs": "^5.3.14",
    "@react-navigation/native": "~5.8.10",
    "@react-navigation/stack": "~5.12.8",
    "expo": "~40.0.0",
    "expo-asset": "~8.2.1",
    "expo-constants": "~9.3.0",
    "expo-font": "~8.4.0",
    "expo-linking": "~2.0.0",
    "expo-splash-screen": "~0.8.0",
    "expo-status-bar": "~1.0.3",
    "expo-web-browser": "~8.6.0",
    "react": "16.13.1",
    "react-dom": "^16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
    "react-native-gesture-handler": "~1.8.0",
    "react-native-safe-area-context": "3.1.9",
    "react-native-screens": "~2.15.0",
    "react-native-tab-view": "^3.0.0",
    "react-native-web": "^0.13.18"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "@types/react": "~16.9.35",
    "@types/react-native": "~0.63.2",
    "jest-expo": "~40.0.0",
    "typescript": "~4.0.0"
  },
  "private": true
}

It seemed to install via yarn, but I didn't want to switch at this point and may think of another solution.

Naphier avatar Mar 10 '21 14:03 Naphier

A quick and dirty solution that has helped me was to put a force flag:

npm i react-native-web-webview -f

MiVladie avatar Apr 16 '21 21:04 MiVladie