Error Can't add “react-navigation”: invalid package version undefined when run yarn

Asked
Active3 hr before
Viewed126 times

9 Answers

invalidpackagereacterror
90%

In the project root directory you can run this command to add dependencies: ,Delete any entry that is available in your package.json that starts with react-navigation and then run,This will add the latest available versions or you can specify the latest version to the package.json dependencies entries:

In the project root directory you can run this command to add dependencies:

yarn add react react - native react - navigation

This will add the latest available versions or you can specify the latest version to the package.json dependencies entries:

dependencies: {
   .....
   "react-navigation": "^4.0.0"
}
load more v
88%

I am trying to install the project packages with the command "yarn " in MacBook Pro,Please help me out I need to install packages with the command "yarn" or "yarn install",and I have another dell laptop (Windows) there I could install the dependencies with the command "yarn"

Pretag
 Pretag team - issue, fix, solve, resolve
72%

I am trying to install the project packages with the command "yarn " in MacBook Pro,Please help me out I need to install packages with the command "yarn" or "yarn install",and I have another dell laptop (Windows) there I could install the dependencies with the command "yarn"

Pretag
 Pretag team - issue, fix, solve, resolve
65%

Thank you @edward-shen, after running npm install it was fixed here too 😀 I just can’t understand why this happened.,It may be worth noting that upon running yarn install, I get the following warnings:,Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

I’m following the steps at https://docs.expo.io/versions/latest/guides/building-standalone-apps.html to generate a build, but when I try to run exp start the following error occurs:

[exp] Using project at hidden
   [exp] Warning: You are using npm version 5.3 .0.There may be bugs in this version, use it at your own risk.We recommend version 4.6 .1.
   [exp] Invalid Version: undefined[exp] Set EXPO_DEBUG = true in your env to view the stack trace.

app.json file:

{
   "expo": {
      "name": "hidden",
      "icon": "hidden",
      "version": "1.0.0",
      "slug": "hidden",
      "sdkVersion": "19.0.0",
      "android": {
         "package": "hidden"
      },
      "ios": {
         "bundleIdentifier": "hidden"
      }
   }
}

package.json:

{
   "name": "hidden",
   "version": "1.0.0",
   "private": true,
   "devDependencies": {
      "eslint": "^4.3.0",
      "eslint-config-airbnb": "^15.1.0",
      "eslint-plugin-import": "^2.7.0",
      "eslint-plugin-jsx-a11y": "^5.1.1",
      "eslint-plugin-react": "^7.1.0",
      "jest-expo": "~19.0.0",
      "react-test-renderer": "16.0.0-alpha.12"
   },
   "main": "index.js",
   "scripts": {
      "test": "node node_modules/jest/bin/jest.js --watch",
      "eslint": "eslint ./ --fix"
   },
   "jest": {
      "preset": "jest-expo"
   },
   "dependencies": {
      "axios": "^0.16.2",
      "expo": "^19.0.0",
      "react": "16.0.0-alpha.12",
      "react-native": "https://github.com/expo/react-native/archive/sdk-19.0.0.tar.gz",
      "react-native-animatable": "^1.2.3",
      "react-native-blur": "^3.1.3",
      "react-native-ui-lib": "^2.0.76",
      "react-navigation": "^1.0.0-beta.11",
      "react-redux": "^5.0.6",
      "redux": "^3.7.2",
      "redux-promise": "^0.5.3"
   }
}
load more v
75%

Pretag
 Pretag team - issue, fix, solve, resolve
40%

Pretag
 Pretag team - issue, fix, solve, resolve
22%

npm i react-navigation-stack,Gitgithub.com/react-navigation/react-navigation-stack,github.com/react-navigation/react-navigation-stack#readme

yarn add react - navigation - stack @react - native - community / masked - view react - native - safe - area - context
load more v
60%

Pretag
 Pretag team - issue, fix, solve, resolve
48%

warn Package @cometchat-pro/react-native-chat has been ignored because it contains invalid configuration. Reason: Cannot find module ‘@cometchat-pro/react-native-chat/package.json’,This is what it says in package.json: “@cometchat-pro/react-native-chat”: “^2.0.8”,,I checked node_modules, and both “@cometchat-pro/react-native-chat” and “base-64” were missing.

Pretag
 Pretag team - issue, fix, solve, resolve

Other "invalid-package" queries related to "Error Can't add “react-navigation”: invalid package version undefined when run yarn"