{"record":{"id":"0c44670370717a0d","repo":"ipfs/kubo","slug":"removed-use-ipfs-routing-instead","errorCode":null,"errorMessage":"removed, use 'ipfs routing' instead","messagePattern":"removed, use 'ipfs routing' instead","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/dht.go","lineNumber":130,"sourceCode":"\t\t\tpfm := pfuncMap{\n\t\t\t\trouting.FinalPeer: func(obj *routing.QueryEvent, out io.Writer, verbose bool) error {\n\t\t\t\t\tfmt.Fprintf(out, \"%s\\n\", obj.ID)\n\t\t\t\t\treturn nil\n\t\t\t\t},\n\t\t\t}\n\t\t\tverbose, _ := req.Options[dhtVerboseOptionName].(bool)\n\t\t\treturn printEvent(out, w, verbose, pfm)\n\t\t}),\n\t},\n\tType: routing.QueryEvent{},\n}\nvar RemovedDHTCmd = &cmds.Command{\n\tStatus: cmds.Removed,\n\tHelptext: cmds.HelpText{\n\t\tTagline: \"Removed, use 'ipfs routing' instead.\",\n\t},\n\tRun: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {\n\t\treturn errors.New(\"removed, use 'ipfs routing' instead\")\n\t},\n}\n","sourceCodeStart":112,"sourceCodeEnd":133,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/dht.go#L112-L133","documentation":"The `ipfs dht` command tree was removed and folded into `ipfs routing`; invoking a removed command returns this hard error from its Run function. It is a deliberate migration error, not a runtime failure. The helptext points users at the replacement.","triggerScenarios":"Invoking any subcommand under the removed `ipfs dht` tree (RemovedDHTCmd) in a kubo version where those commands were removed.","commonSituations":"Outdated scripts, documentation, or tutorials written before the dht->routing rename; CI pipelines pinning old command names.","solutions":["Replace `ipfs dht <sub>` with `ipfs routing <sub>` in scripts","Update tooling/docs to the current kubo CLI","Pin an older kubo version temporarily if migration must be deferred"],"exampleFix":"// before\nipfs dht findpeer <peerID>\n// after\nipfs routing findpeer <peerID>","handlingStrategy":"validation","validationCode":"if strings.HasPrefix(cmd, \"ipfs dht \") { cmd = strings.Replace(cmd, \"ipfs dht \", \"ipfs routing \", 1) }","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"removed, use 'ipfs routing'\") { retryWithRoutingCommand() }","preventionTips":["Migrate scripts from `ipfs dht` to `ipfs routing` once, permanently","Pin kubo versions in CI and test CLI invocations on upgrades"],"tags":["cli","deprecated","removed-command"],"backgroundTag":"command-removed-use-replacement","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}