1

When i try nitro add command to they return "There are no sites in the config file" what should i do?

Unable to locate a webroot, setting to web.
Enter the webroot [web] web
Added tutorial.test to config file
Apply changes from config? [yes] yes
Mounting ~/Nitro/projects/tutorial to nitro-dev
Adding site tutorial.test to nitro-dev
Applied changes from /home/pedro/.nitro/nitro-dev.yaml                          
[sudo] senha para pedro: 
There are no sites in the config file.
1
  • Can you edit your question and share the contents of /home/pedro/.nitro/nitro-dev.yaml?
    – Brad Bell
    Commented Nov 5, 2020 at 18:55

1 Answer 1

1

It probably because nitro doesn't overwrite your host file. You may need to edit it yourself using nano (assuming you're on linux).

sudo nano /etc/hosts

you will need to provide

  • the IP address- that you can find using nitro info in the terminal or by opening the nitro-dev shell in multipass
  • the hostname- example.test or whatever else that may be

There is a github issue raised for it, see https://github.com/craftcms/nitro/issues/213

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.