EAS - npx eas-cli or eas command

Hi,

I have 2 ways to launch my EAS build at the moment:

  • npx eas-cli build --platform ios
  • eas build --platform ios

They both work, but they show me this warning I see the message “eas-cli@2.1.0 is now available, please upgrade.” that I don’t get:

  • eas -v returns “eas-cli/2.1.0 darwin-x64 node-v17.4.0” (so I would assume I should not get this warning message)
  • only removing cli.version in my eas.json removes this warning

but the question remains: how do I upgrade my eas-cli ?

thanks for your help!

it seems like npx is using a cached version. try npx eas-cli@latest. may be worth verifying also that you don’t have eas-cli installed locally to your project

It’s not installed locally and despite running npx eac-cli@latest or npm install -g eas-cli, I still have the console asking me to install the package…

don’t run npx. just run eas and see what the result is when you run eas --version

this is not an issue with eas-cli or expo but rather with your npm configuration

just running eas works, I don’t know why but I was sure I saw it written somewhere in your docs that we should use npx, my bad then

you can typically use npx if you want, but it looks like there may be something related to npm that is misconfigured on your machine leading it to resolve an old version of the package

1 Like

When running the expo command in an Expo SDK 46 (or later) project, you should use npx expo ... but for eas it’s still just eas, although npx eas should also work. There are still a couple of things that you need expo-cli for instead of npx expo. e.g. expo-cli upgrade (as far as I remember) instead of npx expo upgrade.

As Brent mentions, you should not have eas-cli in your app’s dependencies. The same goes for expo-cli.

1 Like

How do I find that to fix my local config?
There is only 1 version of eas installed globally, and npx is supposed to execute from online, which is why I dont get why I have to download all the time eas-cli nor why the version would not be up to date…

Check if you have eas-cli or expo-cli in your package.json dependencies or devDependencies. If you do, uninstall them (with npm uninstall eas-cli expo-cli or yarn remove eas-cli expo-cli depending on which tool you use to manage the dependencies of your project.)

Hi @wodin,
I don’t have them, that’s my point:

package.json

{
  "name": "lissen",
  "version": "0.1.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest --watchAll",
    "pod": "cd ios && pod install && cd .."
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@apollo/client": "^3.5.10",
    "@expo/vector-icons": "^13.0.0",
    "@hookstate/core": "^3.0.13",
    "@magic-sdk/react-native": "^8.2.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "9.3.0",
    "@react-native-community/slider": "4.2.3",
    "@react-native-firebase/app": "^15.7.0",
    "@react-native-firebase/firestore": "^15.7.0",
    "@react-native-firebase/storage": "^15.7.0",
    "@react-native-picker/picker": "2.4.2",
    "@react-navigation/bottom-tabs": "^6.0.5",
    "@react-navigation/material-top-tabs": "^6.2.2",
    "@react-navigation/native": "^6.0.8",
    "@react-navigation/native-stack": "^6.1.0",
    "@react-navigation/stack": "^6.1.1",
    "@sentry/react-native": "4.2.2",
    "date-fns": "^2.28.0",
    "dotenv": "^16.0.1",
    "expo": "~46.0.13",
    "expo-app-loading": "~2.1.0",
    "expo-application": "~4.2.2",
    "expo-asset": "~8.6.1",
    "expo-blur": "~11.2.0",
    "expo-constants": "~13.2.4",
    "expo-dev-client": "~1.3.0",
    "expo-device": "~4.3.0",
    "expo-document-picker": "~10.3.0",
    "expo-font": "~10.2.0",
    "expo-image-picker": "~13.3.1",
    "expo-linking": "~3.2.2",
    "expo-location": "~14.3.0",
    "expo-media-library": "~14.2.0",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",
    "expo-updates": "~0.14.6",
    "expo-web-browser": "~11.0.0",
    "formik": "^2.2.9",
    "graphql": "^16.3.0",
    "lodash.differenceby": "^4.8.0",
    "lodash.shuffle": "^4.2.0",
    "node-libs-browser": "^2.2.1",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.6",
    "react-native-file-access": "^2.5.0",
    "react-native-flash-message": "^0.2.1",
    "react-native-fs": "^2.20.0",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-get-mp3-duration": "^1.0.3",
    "react-native-indicators": "^0.17.0",
    "react-native-iphone-x-helper": "^1.3.1",
    "react-native-pager-view": "5.4.24",
    "react-native-picker-select": "^8.0.4",
    "react-native-progress": "^5.0.0",
    "react-native-restart": "^0.0.24",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-select-dropdown": "^2.0.3",
    "react-native-sound": "^0.11.2",
    "react-native-svg": "12.3.0",
    "react-native-tab-view": "^3.1.1",
    "react-native-track-player": "2.2.0-rc3",
    "react-native-view-shot": "3.3.0",
    "react-native-web": "~0.18.7",
    "react-native-webview": "11.23.0",
    "rn-fetch-blob": "^0.12.0",
    "sentry-expo": "~5.0.0",
    "web3": "^1.7.1"
  },
  "devDependencies": {
    "@babel/core": "^7.18.6",
    "@types/react": "~18.0.0",
    "@types/react-native": "~0.69.1",
    "jest": "^26.6.3",
    "jest-expo": "^46.0.0",
    "react-test-renderer": "17.0.1",
    "typescript": "^4.6.3"
  },
  "private": true
}

OK, not sure then, but you could try running:

npm why eas-cli

and see if that gives you any ideas.

Although, I suspect it will say:

npm ERR! No dependencies found matching eas-cli

So if you don’t have it as a dependency, I don’t know why running it with or without prefixing it with npx would have different results. Maybe see if you get any differences if you the following?

npx npm list -g eas-cli
npm list -g eas-cli

Hi, when doing

npm why eas-cli

I indeed get

npm ERR! No dependencies found matching eas-cli

other results:

OK, then I currently have no more ideas about what is wrong.

ok thanks for your time though, highly appreciated

1 Like