skip to Main Content

I was trying to input ‘npm install @react-navigation/native-stack’ In my vscode’s terminal to install @react-navigation/native-stack but during installing, error occured.
The following is error message.

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/react-navigation/native-stack.git
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR! path(my log files path)

my package.json file

{
  "name": "userinterface",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-navigation/native": "^6.0.13",
    "expo": "~46.0.9",
    "expo-status-bar": "~1.4.0",
    "react": "18.0.0",
    "react-native": "0.69.5",
    "react-native-screens": "~3.15.0",
    "react-native-safe-area-context": "4.3.1",
    "undefined": "react-navigation/native-stack"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

I’m newbie for react-native and programming. so I don’t know what to upload here. if you need more information to solve this problem, I will upload that.

2

Answers


  1. It could be a compatibility issue.

    Try running
    npm install npm@latest -g
    and check again

    Login or Signup to reply.
  2. I think there was a mistake in your package.json. It should be a package name following it’s version. In this case it’s should be

    "dependencies": {
        "@react-navigation/native": "^6.0.13",
        "expo": "~46.0.9",
        "expo-status-bar": "~1.4.0",
        "react": "18.0.0",
        "react-native": "0.69.5",
        "react-native-screens": "~3.15.0",
        "react-native-safe-area-context": "4.3.1",
        "react-navigation/native-stack": "^6.9.0"
      },
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search