[SOLVED] Hugo server process stops on error. How to keep it running?

Hi guys,

I am in a windows environment and I run hugo with the following parameters

&hugo.exe server --navigateToChanged --renderToDisk --gc  --cleanDestinationDir --disableFastRender --disableLiveReload --forceSyncStatic

What I find is that if I have a problem with the site, say for example, I have a shortcode error or something…when I execute the above command, the hugo process quits…

If on the other hand, I have no errors, hugo will continue to run. If while editing things and it does an update, and hits an error, it will tell me, but continue to run…(this is the desired behaviour for me)

Is there any way I can get hugo server to continue running even if there is an error on first load?

Thank you kindly for any advice
John

It’s regenerating so, when it can’t do that due to an error, it follows that it can’t also serve the site. Hence the stoppage, is my understanding. I’ve always just focused on fixing that kind of major error first, so I can serve the site again.

sort of makes a little bit of sense I suppose…I get interupted alot is my problem :expressionless: … curse the world!

A “do not regenerate on load” switch might be nice way to fix it…

At the same time tho, it’s still serving midway through an error anyway, so not sure what the difference would really be…

In either case, thank you, at least I know there is no easy switch to use…I’ll just work with it…

Thank you
John

Explain what you mean by this.

I mean that if you could run the server like this;

hugo.exe server --noRegenerateOrSomeSuchSwitch

That could serve any existing pages without trying to perform any processing on them…Then if there are errors, it could still continue to serve what is there…

It’s likely an ill thought out idea…still very new to hugo…

Does that make sense as to what I mean?

Thank you
John

I see what you mean now. And I agree that it is a bad idea.

1 Like