gohugoio/hugo · error
deploy not supported in this version of Hugo; install a…
Error message
deploy not supported in this version of Hugo; install a release with 'withdeploy' in the archive filename or build yourself with the 'withdeploy' build tag. Also see https://github.com/gohugoio/hugo/pull/12995
What it means
The `hugo deploy` command is only available in Hugo binaries built with the `withdeploy` build tag, which bundles the deployment libraries. deploy_off.go (compiled when !withdeploy) returns this error from its run function so the command fails clearly instead of being absent.
Solutions
- Download a Hugo release archive whose filename contains 'withdeploy'
- Build from source with: go build -tags withdeploy
- Use `hugo deploy` only with a withdeploy-enabled binary
Example fix
# before hugo deploy # after (build with the tag) go build -tags withdeploy -o hugy . && ./hugy deploy
Defensive patterns
Strategy: validation
Validate before calling
# detect before relying on deploy if ! hugo deploy --help 2>&1 | grep -q withdeploy; then echo "install withdeploy build"; fi
Prevention
- Use a release archive whose name includes 'withdeploy' when you need deploy
- Add a CI check that asserts the binary supports deploy before invoking it
When it happens
Trigger: Running `hugo deploy ...` with a standard Hugo binary that was not built with the withdeploy tag (deploy_off.go is the active implementation).
Common situations: Installing Hugo via a distro package or `go install` without -tags withdeploy; using a release archive whose filename does not contain 'withdeploy'.
Related errors
- this feature is not available in your current Hugo version…
- abort: jekyll root contains neither posts nor drafts
- aborted
- arguments must be slices or arrays
- arguments to complement must be slices or arrays
AI-assisted analysis of gohugoio/hugo@52c9bd7908 (2026-08-09).
Data as JSON: /api/errors/670f13bb6bea8f49.
Report an issue: GitHub.
Appendix: source
Thrown at commands/deploy_off.go:43
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"context"
"errors"
"github.com/bep/simplecobra"
"github.com/spf13/cobra"
)
func newDeployCommand() simplecobra.Commander {
return &simpleCommand{
name: "deploy",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
return errors.New("deploy not supported in this version of Hugo; install a release with 'withdeploy' in the archive filename or build yourself with the 'withdeploy' build tag. Also see https://github.com/gohugoio/hugo/pull/12995")
},
withc: func(cmd *cobra.Command, r *rootCommand) {
applyDeployFlags(cmd, r)
cmd.Hidden = true
},
}
}
View on GitHub (pinned to 52c9bd7908)