{"record":{"id":"670f13bb6bea8f49","repo":"gohugoio/hugo","slug":"deploy-not-supported-in-this-version-of-hugo-inst","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"commands/deploy_off.go","lineNumber":43,"sourceCode":"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage commands\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\t\"github.com/bep/simplecobra\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc newDeployCommand() simplecobra.Commander {\n\treturn &simpleCommand{\n\t\tname: \"deploy\",\n\t\trun: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {\n\t\t\treturn 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\")\n\t\t},\n\t\twithc: func(cmd *cobra.Command, r *rootCommand) {\n\t\t\tapplyDeployFlags(cmd, r)\n\t\t\tcmd.Hidden = true\n\t\t},\n\t}\n}\n","sourceCodeStart":25,"sourceCodeEnd":51,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/commands/deploy_off.go#L25-L51","documentation":"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.","triggerScenarios":"Running `hugo deploy ...` with a standard Hugo binary that was not built with the withdeploy tag (deploy_off.go is the active implementation).","commonSituations":"Installing Hugo via a distro package or `go install` without -tags withdeploy; using a release archive whose filename does not contain 'withdeploy'.","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"],"exampleFix":"# before\nhugo deploy\n# after (build with the tag)\ngo build -tags withdeploy -o hugy . && ./hugy deploy","handlingStrategy":"validation","validationCode":"# detect before relying on deploy\nif ! hugo deploy --help 2>&1 | grep -q withdeploy; then echo \"install withdeploy build\"; fi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["deploy","build-tags","go","hugo"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}