Search code examples
react-nativeexpoupgrade

Upgrading to Expo 3.11.5 not happening


I used the following set of commands to upgrade Expo CLI, on my macOS High Sierra 10.13.6:

npm uninstall -g expo-cli --save

then

npm install -g expo-cli --save

But still it says:

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                          │
│   There is a new version of expo-cli available (3.11.5).                                                                                 │
│   You are currently using expo-cli 3.4.1                                                                                                 │
│   Install expo-cli globally using the package manager of your choice; for example: `npm install -g expo-cli` to get the latest version   │
│                                                                                                                                          │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

upon issuing

expo start

from my root directory.

To be noted that while installation, this was the log:

npm WARN @expo/[email protected] requires a peer of sharp-cli@^1.10.0 but none is installed. You must install peer dependencies yourself.

+ [email protected]
added 1572 packages from 929 contributors and updated 1 package in 400.813s

My package.json:

{
  "name": "NativebaseKitchenSink",
  "version": "2.12.0",
  "private": true,
  "devDependencies": {
    "babel-eslint": "7.2.3",
    "eslint": "4.4.1",
    "eslint-plugin-flowtype": "2.35.0",
    "eslint-plugin-import": "2.7.0",
    "eslint-plugin-jsx-a11y": "6.0.2",
    "eslint-plugin-prettier": "2.1.2",
    "eslint-plugin-react": "7.1.0",
    "eslint-plugin-react-native": "3.0.1",
    "flow-bin": "0.78.0",
    "flow-typed": "2.5.1",
    "husky": "0.14.3",
    "jest": "24.1.0",
    "metro-react-native-babel-preset": "0.52.0",
    "prettier": "1.5.3",
    "react-test-renderer": "16.6.3"
  },
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "postinstall": "jetify",
    "and_bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res"
  },
  "jest": {
    "preset": "react-native",
    "transformIgnorePatterns": [
      "node_modules/(?!(react-native|lottie-react-native|expo|react-native-maps|react-native-svg|react-native-branch|native-base-shoutem-theme|react-native-easy-grid|react-native-drawer|react-native-vector-icons|react-native-keyboard-aware-scroll-view|react-native-swiper|react-navigation|native-base|@expo|react-native-scrollable-tab-view|react-native-simple-modal|react-native-iphone-x-helper)/)"
    ]
  },
  "dependencies": {
    "color": "1.0.3",
    "expo": "^35.0.0",
    "expo-cli": "^3.4.1",
    "lodash": "4.17.10",
    "moment": "2.13.0",
    "native-base": "2.12.1",
    "prop-types": "^15.6.2",
    "react": "16.9.0",
    "react-base": "^0.2.0",
    "react-native": "0.59.10",
    "react-native-new-version": "0.61.5",
    "react-native-gesture-handler": "^1.0.15",
    "react-native-vector-icons": "^6.3.0",
    "react-navigation": "3.3.0",
    "scheduler": "^0.12.0",
    "styled-components": "^3.4.5"
  }
}

Why?


Solution

  • I have updated the following dependency in my package.json:

    "expo-cli": "3.11.5",
    

    I have removed the node-modules and issued:

    npm install 
    

    again.