No existing content in directory

I’m new to Hugo and don’t know any programming at all but I managed to create a project in a directory following this guide Primeros pasos con Hugo and sometimes it works but other times I get this:
Error: no existing content directory configured for this project

What is happening?

Welcome to the forum

that’s quite unspecific. :wink:

what’s the current folder when you execute it.
and what’s the exact commandline that causes this message
which hugo version do you use? Output of hugo env

although I cannot reproduce your exact error message using a recent (v0.145.0) version I would suppose you are

  • either not in a proper folder (root of your project) although the normal error message in that case is: Error: Unable to locate config file
  • or you have multiple configurations and some are broken and randomly picked.

you should only have one of these:

  • hugo.toml ← preferred
  • hugo.yaml
  • config.toml
  • config.yaml
  • config folder in your project ← if you split configs to files than this one

have a look at Requesting Help and show us something to work and play with. As always the easiest is to share your repo.

I think that I have multiple configurations and random because I can’t not explain what is happening. Sometimes I’m able to create new content but not always.
But I just have a hugo.toml file in the project folder.

I am going to try to create a new project more slowly.

Thanks!

sounds like you get that error with hugo new content

answers to these will bring us closer.