Troubleshooting

List of known issues and corresponding solutions to help you to troubleshoot.

Unable to locate config file or config directory

You’ll encounter the error below if you forgot to mount site on default working directory, or mounted it on wrong directory.

1Error: Unable to locate config file or config directory. Perhaps you need to create a new site.
2Run `hugo help new` for details.

Unknow command or module

The errors similar to below may reached when executing a nonexistent command.

Some users migrated from klakegg/hugo may encounter this issue, since hugomods/hugo does not add some additional shortcuts for Hugo commands, such as server to hugo server, that is, there is no such server command, to fix it, you just need to replace it with original Hugo command, for example, replace server with hugo server.

1docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "*": executable file not found in $PATH: unknown.
 1node:internal/modules/cjs/loader:1051
 2  throw err;
 3  ^
 4
 5Error: Cannot find module '/src/server'
 6    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
 7    at Module._load (node:internal/modules/cjs/loader:901:27)
 8    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
 9    at node:internal/main/run_main_module:23:47 {
10  code: 'MODULE_NOT_FOUND',
11  requireStack: []
12}
13
14Node.js v20.7.0

Hugo Server Not Running Or Process Exited

Hugo will print stats after building site, if you found out that the process exited without any errors, the process probably was killed by OS.

One common cause is out of memory, to solve the memory issue, you can:

  1. Add more memory.
  2. For Hugo 0.123.0 or later, disable the --renderToMemory flag if it is enabled.
  3. For Hugo 0.122.* or earlier, enable the --renderToDisk flag.