Error with Hugo server

Error: Unable to locate Config file. Perhaps you need to create a new site.
Run Hugo help new for details. (Config File “config” Not Found in “[/var/lib/snapd/void]”)
I get that error when I try running Hugo server -w I’m using ubuntu 16.0 and installed Hugo from Snap package.

Please read the Quick Start Tutorial to understand the basics of Hugo.

1 Like

That’s right, the quick start has you covered.

For a quick summary, you’ll either need to do one of two things:

  • Create a new Hugo website first. For that navigate to the folder where you want to store the new site and type hugo new site [foldername] in the terminal.
  • Or, if you already have made a Hugo website, then navigate to the folder where it’s stored and type in the command line hugo server there.

This way of working with the command line is a bit different than other CMSs but once you get it, it makes a lot of sense. For instance, the error message that hugo server gives you know says that it cannot find the site (and its configuration file).

This for a part makes sense because we cannot tell hugo server where the site folder is; it simply uses the folder in which we run the hugo server command. And so we need to run hugo server in a folder that has a Hugo website in it. (I hope that makes sense. Explaining it might be harder than understanding it once it ‘clicks’. :slight_smile: )

1 Like