0

I have this error, I am confused, should I upgrade or change version of npm?, I just want to run my app using npm install I tried npm install --legacy-peer-deps and it works but I doubt it will be a bigger problem in the future development, especially rejecting the unsupported libraries, what should I do?, yet I need all of this libraries, should I change it? need help

npm install

D:\mobile\finds-mobile>npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @typescript-eslint/eslint-plugin@4.33.0
npm WARN Found: eslint@8.12.0
npm WARN node_modules/eslint
npm WARN   dev eslint@"^8.12.0" from the root project
npm WARN   11 more (@react-native-community/eslint-config, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from @typescript-eslint/eslint-plugin@4.33.0
npm WARN node_modules/@typescript-eslint/eslint-plugin
npm WARN   @typescript-eslint/eslint-plugin@"^4.22.1" from @react-native-community/eslint-config@3.0.1
npm WARN   node_modules/@react-native-community/eslint-config
npm WARN
npm WARN Conflicting peer dependency: eslint@7.32.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from @typescript-eslint/eslint-plugin@4.33.0
npm WARN   node_modules/@typescript-eslint/eslint-plugin
npm WARN     @typescript-eslint/eslint-plugin@"^4.22.1" from @react-native-community/eslint-config@3.0.1
npm WARN     node_modules/@react-native-community/eslint-config
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @typescript-eslint/parser@4.33.0
npm WARN Found: eslint@8.12.0
npm WARN node_modules/eslint
npm WARN   dev eslint@"^8.12.0" from the root project
npm WARN   11 more (@react-native-community/eslint-config, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from @typescript-eslint/parser@4.33.0
npm WARN node_modules/@typescript-eslint/parser
npm WARN   @typescript-eslint/parser@"^4.22.1" from @react-native-community/eslint-config@3.0.1
npm WARN   node_modules/@react-native-community/eslint-config
npm WARN   1 more (@typescript-eslint/eslint-plugin)
npm WARN
npm WARN Conflicting peer dependency: eslint@7.32.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from @typescript-eslint/parser@4.33.0
npm WARN   node_modules/@typescript-eslint/parser
npm WARN     @typescript-eslint/parser@"^4.22.1" from @react-native-community/eslint-config@3.0.1
npm WARN     node_modules/@react-native-community/eslint-config
npm WARN     1 more (@typescript-eslint/eslint-plugin)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: eslint-plugin-react-native@3.11.0
npm WARN Found: eslint@8.12.0
npm WARN node_modules/eslint
npm WARN   dev eslint@"^8.12.0" from the root project
npm WARN   11 more (@react-native-community/eslint-config, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^3.17.0 || ^4 || ^5 || ^6 || ^7" from eslint-plugin-react-native@3.11.0
npm WARN node_modules/eslint-plugin-react-native
npm WARN   eslint-plugin-react-native@"^3.10.0" from @react-native-community/eslint-config@3.0.1
npm WARN   node_modules/@react-native-community/eslint-config
npm WARN
npm WARN Conflicting peer dependency: eslint@7.32.0
npm WARN node_modules/eslint
npm WARN   peer eslint@"^3.17.0 || ^4 || ^5 || ^6 || ^7" from eslint-plugin-react-native@3.11.0
npm WARN   node_modules/eslint-plugin-react-native
npm WARN     eslint-plugin-react-native@"^3.10.0" from @react-native-community/eslint-config@3.0.1
npm WARN     node_modules/@react-native-community/eslint-config
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-dom@18.2.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR!   peer react@">=16.x" from @fortawesome/react-fontawesome@0.1.18
npm ERR!   node_modules/@fortawesome/react-fontawesome
npm ERR!     @fortawesome/react-fontawesome@"^0.1.14" from style-components@0.1.0
npm ERR!     node_modules/style-components
npm ERR!       style-components@"^0.1.0" from the root project
npm ERR!   58 more (@haskkor/react-native-pincode, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.2.0" from react-dom@18.2.0
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@">=16.6.0" from react-transition-group@4.4.2
npm ERR!   node_modules/react-transition-group
npm ERR!     react-transition-group@"^4.4.1" from style-components@0.1.0
npm ERR!     node_modules/style-components
npm ERR!       style-components@"^0.1.0" from the root project
npm ERR!   peer react-dom@">=16.8.0" from style-components@0.1.0
npm ERR!   node_modules/style-components
npm ERR!     style-components@"^0.1.0" from the root project
npm ERR!   1 more (styled-components)
npm ERR!
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR!   peer react@"^18.2.0" from react-dom@18.2.0
npm ERR!   node_modules/react-dom
npm ERR!     peer react-dom@">=16.6.0" from react-transition-group@4.4.2
npm ERR!     node_modules/react-transition-group
npm ERR!       react-transition-group@"^4.4.1" from style-components@0.1.0
npm ERR!       node_modules/style-components
npm ERR!         style-components@"^0.1.0" from the root project
npm ERR!     peer react-dom@">=16.8.0" from style-components@0.1.0
npm ERR!     node_modules/style-components
npm ERR!       style-components@"^0.1.0" from the root project
npm ERR!     1 more (styled-components)
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\Macky\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\Macky\AppData\Local\npm-cache\_logs\2022-07-25T01_01_52_241Z-debug-0.log

package.json

  {
  "name": "test",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@haskkor/react-native-pincode": "^1.22.6",
    "@react-native-async-storage/async-storage": "^1.17.3",
    "@react-native-community/google-signin": "^5.0.0",
    "@react-native-community/netinfo": "^8.2.0",
    "@react-native-firebase/app": "^14.7.0",
    "@react-native-firebase/auth": "^14.7.0",
    "@react-native-firebase/firestore": "^14.7.0",
    "@react-native-firebase/storage": "^14.7.0",
    "@react-native-masked-view/masked-view": "^0.2.6",
    "@react-navigation/bottom-tabs": "^6.3.1",
    "@react-navigation/drawer": "^6.4.1",
    "@react-navigation/native": "^6.0.10",
    "@react-navigation/stack": "^6.2.1",
    "moment": "^2.29.1",
    "npm": "^8.6.0",
    "react": "17.0.2",
    "react-native": "0.68.0",
    "react-native-action-button": "^2.8.5",
    "react-native-camera": "^4.2.1",
    "react-native-fbsdk": "^3.0.0",
    "react-native-gesture-handler": "^2.3.2",
    "react-native-gifted-chat": "^0.16.3",
    "react-native-image-crop-picker": "^0.37.3",
    "react-native-keychain": "^8.0.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-onboarding-swiper": "^1.2.0",
    "react-native-qrcode-scanner": "^1.5.5",
    "react-native-reanimated": "^2.5.0",
    "react-native-safe-area-context": "^4.2.4",
    "react-native-screens": "^3.13.1",
    "react-native-skeleton-placeholder": "^5.0.0",
    "react-native-svg": "^12.3.0",
    "react-native-timeline-flatlist": "^0.8.0",
    "react-native-timeline-listview": "^0.2.3",
    "react-native-touch-id": "^4.4.1",
    "react-native-vector-icons": "^9.1.0",
    "reanimated-bottom-sheet": "^1.0.0-alpha.22",
    "style-components": "^0.1.0",
    "styled-components": "^5.3.5",
    "victory-native": "^36.3.1"
  },
  "devDependencies": {
    "@babel/core": "^7.17.8",
    "@babel/runtime": "^7.17.8",
    "@react-native-community/cli": "^7.0.3",
    "@react-native-community/eslint-config": "^3.0.1",
    "babel-jest": "^27.5.1",
    "eslint": "^8.12.0",
    "jest": "^27.5.1",
    "metro-react-native-babel-preset": "^0.70.0",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  },
  "rnpm": {
    "assets": [
      "./assets/fonts"
    ]
  }
}

1 Answers1

0

Perform the Below steps:

  1. delete node_modules folder
  2. delete package-lock.json file
  3. install new version of dev Dependencies.
  4. npm install

Hope it will help you!

Nensi Kasundra
  • 1,980
  • 6
  • 21
  • 34