craftcms / nitro

Speedy local dev environment for @craftcms.
https://getnitro.sh
MIT License
178 stars 24 forks source link

Nitro fails to show version, updates – but appears to still work? #270

Closed OneMohrTime closed 3 years ago

OneMohrTime commented 3 years ago

Description

I followed the installation instructions, and completely removed multipass from my Mac. I installed through homebrew, and when I checked the version number, I got:

nitro version
Error: unable to get version from the gRPC API

Naturally, I just tried to re-update, but I'm up-to-date

nitro self-update
Checking for updates
up to date!

nitro update
Error: there is no config file for the environment

I'm not sure what config file its referencing, as there isn't one mentioned in the instructions. nitro help also outputs all of the options, as expected – so some commands work.

Is this just a bug?

Screen Shot 2021-03-03 at 17 06 25

Steps to reproduce

  1. Uninstall Nitro 1
  2. Install Nitro 2

Additional info


EDIT

Solved by nitro init. Just needs to be run once, or else of course there's no version.

jasonmccallister commented 3 years ago

@OneMohrTime the version command is used to get the version of Docker, Nitro API (gRPC), and the CLI version.

From the error message above, it appears you did not run nitro init which is why it cannot talk to the API that does not exist.

To get the CLI version from Nitro, you can run nitro -v.

Perhaps we should update the version command to suggest running start or init to make it more user friendly.

OneMohrTime commented 3 years ago

Totally got it after that. I wasn't paying full attention during the switchover, I should have read more closely 🤦

jasonmccallister commented 3 years ago

@OneMohrTime the next release will check if the init command has been run and prompt the user to run init before continuing.

CleanShot 2021-03-04 at 10 20 27@2x

OneMohrTime commented 3 years ago

Great solution!

jasonmccallister commented 3 years ago

This was released with 2.0.4!

craftedsystems commented 2 years ago

I still get this error Error: unable to get version from the gRPC API with nitro 2.0.8. Running the init command fixed it, but nitro did not tell me to do that.