{"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/8a468df065a75c1c7cf9f6850f32148746590ea5/commands/deploy_off.go#L25-L51","documentation":"Returned unconditionally by the stub `hugo deploy` command compiled when the `withdeploy` build tag is absent (commands/deploy_off.go:42-44, guarded by `//go:build !withdeploy`). Since Hugo v0.141 (PR 12995), the deploy feature and its heavy cloud-provider dependencies (AWS/GCS/Azure SDKs) were moved behind an opt-in build tag, so standard release binaries ship with deploy disabled and the command hidden.","triggerScenarios":"Running `hugo deploy` with any binary built without `-tags withdeploy` — the stub command always returns this error regardless of flags or configuration. Applies to the standard release archives (those without 'withdeploy' in the filename), most package-manager builds, and default `go install github.com/gohugoio/hugo@latest` builds.","commonSituations":"Upgrading from Hugo < v0.141 where deploy was built-in and having existing deploy pipelines break; installing Hugo via apt/snap/brew/scoop packages built without the tag; CI images pulling the plain release archive instead of the withdeploy variant.","solutions":["Download the release archive whose filename contains 'withdeploy' (e.g. hugo_withdeploy_<version>_<os>-<arch>.tar.gz) from the GitHub releases page and use that binary.","Build from source with the tag: `go install -tags withdeploy github.com/gohugoio/hugo@latest` (add `extended,withdeploy` if you also need extended features).","Update CI to pin the withdeploy artifact, or replace `hugo deploy` with a provider CLI (aws s3 sync, gcloud storage rsync, az storage blob upload-batch)."],"exampleFix":"# before (CI)\ngo install github.com/gohugoio/hugo@latest\nhugo deploy\n# after\ngo install -tags withdeploy github.com/gohugoio/hugo@latest\nhugo deploy","handlingStrategy":"fallback","validationCode":"// Check at startup whether this Hugo build includes deploy support\nout, _ := exec.Command(\"hugo\", \"version\").Output()\nif !strings.Contains(string(out), \"withdeploy\") {\n    // deploy unavailable in this binary\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"deploy not supported\") {\n    // fall back to an alternate deploy path (rsync, CI deploy) or instruct install of withdeploy build\n}","preventionTips":["Install the 'withdeploy' release archive or build with the 'withdeploy' build tag if you use hugo deploy","Detect build capabilities at startup rather than at deploy time","Pin the exact Hugo distribution (extended/withdeploy) in CI and document it in the project README"],"tags":["hugo","deploy","build-tags","versioning","cli"],"analyzedSha":"8a468df065a75c1c7cf9f6850f32148746590ea5","analyzedAt":"2026-07-31T21:23:07.045Z","schemaVersion":2}