Hugo server and Git worktree problem

Hi-
Looking to use Git worktrees for simultaneous branch work on Hugo projects. I setup worktrees in a separate worktrees/ folder, one for each branch. Running hugo server -D inside worktree fails for two projects I tested.

  1. https://github.com/contivpp/contivpp-site. Partial output for worktreesTest/ folder and run2 worktree:
ERROR 2021/10/28 13:43:42 render of "page" failed: execute of template failed: template: architecture/single.html:4:4: executing "architecture/single.html" at <partial "head.html" .>: error calling partial: "/Users/christophermetz/worktreeTest/run2/layouts/partials/head.html:14:3": execute of template failed: template: partials/head.html:14:3: executing "partials/head.html" at <partial "favicon.html" .>: error calling partial: partial "favicon.html" not found

I played around with baseURL and some of the Dir flags.

  1. GitHub - kubernetes/website: Kubernetes website and documentation repo:. Running hugo server -D message:
Error: from config: failed to resolve output format "print" from site config

Any idea on how I can configure? I am running:
hugo v0.87.0-B0C541E4+extended darwin/amd64 BuildDate=2021-08-03T10:57:28Z VendorInfo=gohugoio

Tx!

Both of the projects you reference, contivpp and kubernetes, have one or more submodules.

This failed:

git clone --recurse-submodules https://github.com/contivpp/contivpp-site
cd contivpp-site/
git branch wt1
git worktree add worktree1 wt1
cd worktree1/
hugo

This worked:

git clone --recurse-submodules https://github.com/contivpp/contivpp-site
cd contivpp-site/
git branch wt1
git worktree add worktree1 wt1
cd worktree1/
git submodule update  # IMPORTANT
hugo