React Native error : npm ERR! Could not resolve dependency metro-react-native-babel-preset@"^0.59.0" from the root project

Viewed 542

i want to make a project with command react-native init testproject. but in the end, i have an error like this:

enter image description here

and this is the error report

    # npm resolution error report

2020-11-03T02:54:54.926Z

Found: metro-react-native-babel-preset@0.58.0
node_modules/metro-react-native-babel-preset
  dev metro-react-native-babel-preset@"^0.59.0" from the root project

Could not resolve dependency:
dev metro-react-native-babel-preset@"^0.59.0" from the root project

Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

Raw JSON explanation object:

{
  "code": "ERESOLVE",
  "current": {
    "name": "metro-react-native-babel-preset",
    "version": "0.58.0",
    "location": "node_modules/metro-react-native-babel-preset",
    "dependents": [
      {
        "type": "dev",
        "name": "metro-react-native-babel-preset",
        "spec": "^0.59.0",
        "error": "INVALID",
        "from": {
          "location": "C:\\Users\\Bagas Bowo\\Project Native\\testproject"
        }
      }
    ]
  },
  "edge": {
    "type": "dev",
    "name": "metro-react-native-babel-preset",
    "spec": "^0.59.0",
    "error": "INVALID",
    "from": {
      "location": "C:\\Users\\Bagas Bowo\\Project Native\\testproject"
    }
  },
  "peerConflict": null,
  "strictPeerDeps": false,
  "force": false
}

can someone help me please, thankyou so much!

0 Answers
Related