Hello everyone,
Impossible to upgrade eas-cli, whatever I do.
Any idea ?
Thanks a lot !
Hello everyone,
Impossible to upgrade eas-cli, whatever I do.
Any idea ?
Thanks a lot !
Hi @wodin
Nothing special. The package seems to install normally. But thatâs not the case.
Iâve never been able to update eas-cli.
I used this syntax: npx eas-cli to always use the latest version. But since I use the SDK 48, this trick no longer worksâŚ
you probably installed eas-cli using another copy of node whose global node modules directory takes precedence (appears first in PATH). try to find where that eas-cli installation is (on macos this would be âwhich eas-cliâ) and remove it
Then brents is right that you have two copies installed. You are upgrading one copy, but then running the other one.
Try running echo %PATH%
Then start looking in each directory listed in the path for eas
(I suppose on Windows it would probably be eas.bat
or eas.ps1
or something like that). If you go through them in order, the first one you find is the one you are running.
Itâs possible that the version of npm
that you are running is not installing binaries to a location that is in your path. Try running npm config --global get prefix
. On Linux or macOS there would be a bin
directory in the prefix
directory and that is where npm
installs the binaries. On Windows, Iâm not sure if the directory will be called bin
. But if you look in the subdirectories of the prefix
for eas.*
then check if that directory is included in your PATH, and if itâs not, add it.
Yes @brents @wodin thereâs two versions but I am unable to find the right path.
I will try your method @wodin
I will let you know !
Thanks a lot for your replies
Well @brents @wodin I cannot find old version of eas-cli. The most recent is easily found but impossible to find the old one. I have more or less tried everything. Until I erased from my machine (I use Windows) all files similar to eas-cli and reinstalled everything. Nothing to do.
In this case, I have this problem since I use the local expo-cliâŚ
Please check if you have eas-cli
listed in your dependencies
or devDependencies
in package.json
?
Also, please tell me what you get if you run: npm config --global get prefix
And what does that directory contain?
And: echo %PATH%
Hi @wodin
Sorry for the delay (very busy!)
No eas-cli is not listed in package.json
echo %PATH% gives⌠%PATH%
When I run config â global the path is : C:\Users\m_aur\AppData\Roaming\npm
where the last version of eas-cli is installed (4.1.2)
But I have another eas-cli (and Expo) file here : C:\Users\m_aur\AppData\Local
the version is 3.18.3
Even if I delete everything, everything is reinstalled in the same place.
I still wonder how I can solve this problem.
I looked at comments in which other developers had the same problem and the solution was to remove the duplicates. But in my case, it doesnât work!!
I do not really know what else to doâŚ
In any case, thank you for your help Wodin
Sorry, that would have worked in CMD.EXE
, but in PowerShell apparently you would have to do this:
echo $env:path
Do you mean you have files called something like the following?
C:\Users\m_aur\AppData\Local\eas.bat (or .cmd or .exe etc.)
C:\Users\m_aur\AppData\Local\expo.bat (or .cmd or .exe etc.)
I assume the eas.*
file is in a subdirectory of the above npm
directory. Sorry, I donât have a Windows box with npm
installed that I can check myself.
What happens if you add the above directory at the start of your PATH
?
e.g. on Windows 10 you should be able to open the Settings app and type âenvâ into the âFind a settingâ search box. If you choose either of the âyour accountâ or âsystemâ options it will open a window with the user and system environment variables.
Youâll probably see a âPathâ environment variable in both user and system sections. When you open a new PowerShell session, the PATH will contain first the System version of the PATH followed by the user version of the PATH. So in order to make sure that npm
âs global binary directory is first in the PATH you would need to put it at the start of the System âPathâ environment variable and add a semicolon to separate it from the rest of the directories on the PATH.
Then open a new PowerShell session and try eas --version
.
Hi @wodin
Yes indeed it works better with echo $env:path (see screenshot)
No, the files I find on this path: AppData\Local do not have the extension bat or cmd or exe (see screenshot)
Then I followed your instructions but⌠I donât see how to correct the problem. As a general rule, I never touch Windows settings - unless I have no choice!
Iâll keep looking but in the meantime Iâm forced to use an backdated version of eas-cliâŚ
Anyway thanks for your help!
Hi, I have a similar problem. After I used âwhich easâ, I then removed the directory with ârmâ keyword before the path and then installed eas cli globally in my project still Iâm having errors. If I run eas build:configure, I will get no directory or file path found. if I run eas whoami, no directory or file path found. kindly help
OK, so I see the path contains:
Iâve just got hold of a Windows 10 VM and installed Node 18 on it. It automatically added an entry to the end of the user PATH that is the same as the one at the end of your PATH (except for the username).
At first, that directory did not exist.
Then I ran npm i -g eas-cli
After that, the directory did exist and contained the following:
PS C:\Users\user> dir $env:APPDATA\npm
Directory: C:\Users\user\AppData\Roaming\npm
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2023/08/31 15:21 node_modules
-a---- 2023/08/31 15:21 318 eas
-a---- 2023/08/31 15:21 330 eas.cmd
-a---- 2023/08/31 15:21 825 eas.ps1
PS C:\Users\user>
If I run npm config -g get prefix
, I get the following:
PS C:\Users\user> npm config -g get prefix
C:\Users\user\AppData\Roaming\npm
So as far as I can see, on this VM, the AppData\Roaming\npm
directory is the one you want. But something before it in the path has another copy of eas
. (Maybe C:\Program Files\nodejs
?)
If you canât find where this other copy of eas
is, I would edit your PATH to put C:\Users\m_aur\AppData\Roaming\npm
at the start of the system path instead of at the end of the user path.
Same problem here. The workaround is to run with npx
.
npx eas-cli -v
eas-cli/5.0.2 win32-x64 node-v18.17.1
npm list -g
C:\Program Files\nodejs -> .\
âââ eas-cli@5.0.2
âââ npm@9.6.7
eas -v
â
eas-cli@5.0.2 is now available.
To upgrade, run npm install -g eas-cli.
Proceeding with outdated version.
eas-cli/3.8.1 win32-x64 node-v18.17.1