statamic / cli

Install and manage your Statamic projects from the command line.
71 stars 19 forks source link

Being asked to update, no update found #61

Closed grovberg closed 10 months ago

grovberg commented 10 months ago

I'm getting an error telling me I'm running an old version of the CLI (which appears to be true, I'm on 2.6) but when I run composer update statamic/cli it reports "Nothing to install, update or remove." I also tried running composer global require statamic/cli and got the same result.

I can see that ~/.composer/composer.lock has this entry in it

"name": "statamic/cli", "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/statamic/cli.git", "reference": "15af33a4c8d466a0003b9dea744f97139595e6e5"

Which is probably my problem, but it seems like a bad idea to just start trying to edit this file with my level of composer knowlege, which begins and ends with what was required to get statamic installed. Thanks.

jasonvarga commented 10 months ago

The new version is 3.0. If you had required ^2.0 previously, an update alone wouldn't do it because it's a major version bump.

Run this:

composer global require statamic/cli
jamiematrix commented 7 months ago

I installed the CLI today and got version 2.6 following the install process

Running composer global require statamic/cli again doesn't download the latest version for me.

jamiematrix commented 7 months ago

Odd. I removed it then tried again, and now on v3

grovberg commented 7 months ago

This has repeatedly been my experience as well. My current strategy is to run composer global require statamic/cli once a day until it works and it usually does eventually, though I've no idea why. I've managed to get most installs to work this way, but I've got a fresh install on a brand new Windows 11 machine that still refuses to update.

ap1969 commented 6 months ago

I had the same problem on win 11, 2 years later. in the end, had to delete my global composer folder and re-install statamic/cli again. Note: For some reason, WSL also looks at the windows folders, so I had the same problem, and solution, to get it working in WSL.