{"record":{"id":"f05e2461a77c0d24","repo":"ipfs/kubo","slug":"s-path-cannot-be-empty","errorCode":null,"errorMessage":"%s path cannot be empty","messagePattern":"(.+?) path cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/daemon.go","lineNumber":1285,"sourceCode":"\tif err != nil {\n\t\treturn fmt.Errorf(\"mountFuse: ConstructNode() failed: %s\", err)\n\t}\n\n\terr = nodeMount.Mount(node, fsdir, nsdir, mfsdir)\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Extra space after \"MFS\" so \"mounted at:\" lines up with IPFS and\n\t// IPNS in the column above. Matches MountCmd's output formatter.\n\tfmt.Printf(\"IPFS mounted at: %s\\n\", fsdir)\n\tfmt.Printf(\"IPNS mounted at: %s\\n\", nsdir)\n\tfmt.Printf(\"MFS  mounted at: %s\\n\", mfsdir)\n\treturn nil\n}\n\nfunc checkFusePath(name, path string) error {\n\tif path == \"\" {\n\t\treturn fmt.Errorf(\"%s path cannot be empty\", name)\n\t}\n\n\tfileInfo, err := os.Stat(path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn fmt.Errorf(\"%s path (%q) does not exist: %w\", name, path, err)\n\t\t}\n\t\treturn fmt.Errorf(\"error while inspecting %s path (%q): %w\", name, path, err)\n\t}\n\n\tif !fileInfo.IsDir() {\n\t\treturn fmt.Errorf(\"%s path (%q) is not a directory\", name, path)\n\t}\n\n\treturn nil\n}\n\nfunc maybeRunGC(req *cmds.Request, node *core.IpfsNode) (<-chan error, error) {","sourceCodeStart":1267,"sourceCodeEnd":1303,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/daemon.go#L1267-L1303","documentation":"checkFusePath validates a configured mount path before FUSE mounting. If the path is an empty string, it returns \"%s path cannot be empty\" where %s is the config name (Mounts.IPFS, Mounts.IPNS, or Mounts.MFS). This catches mount points left unset in the configuration, since FUSE cannot mount at an empty path.","triggerScenarios":"Running `ipfs daemon --mount` (or `ipfs mount`) with cfg.Mounts.IPFS, cfg.Mounts.IPNS, or cfg.Mounts.MFS empty in the repo config and no corresponding CLI flag (--mount-ipfs / --mount-ipns / --mount-mfs) supplied.","commonSituations":"Fresh repo where Mounts.* were never set; a config migration or manual edit cleared the values; scripted daemon startup passing empty strings for the mount keywords.","solutions":["Set the mount points in config: `ipfs config Mounts.IPFS /ipfs`, `ipfs config Mounts.IPNS /ipns`, `ipfs config Mounts.MFS /mfs`","Or pass the paths on the command line: `ipfs daemon --mount --mount-ipfs=/ipfs --mount-ipns=/ipns`","Inspect current values with `ipfs config Mounts.IPFS` (and IPNS/MFS) to find which one is empty"],"exampleFix":"// before (config)\n\"Mounts\": {\"IPFS\": \"\", \"IPNS\": \"/ipns\", \"MFS\": \"/mfs\"}\n// after\n\"Mounts\": {\"IPFS\": \"/ipfs\", \"IPNS\": \"/ipns\", \"MFS\": \"/mfs\"}","handlingStrategy":"validation","validationCode":"for name, p := range map[string]string{\"Mounts.IPFS\": cfg.Mounts.IPFS, \"Mounts.IPNS\": cfg.Mounts.IPNS, \"Mounts.MFS\": cfg.Mounts.MFS} {\n\tif p == \"\" {\n\t\treturn fmt.Errorf(\"%s must be set before --mount\", name)\n\t}\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set Mounts.IPFS/IPNS/MFS in config before enabling --mount","Always pass explicit --mount-ipfs/--mount-ipns/--mount-mfs flags in automation","Audit config after migrations or manual edits that touch the Mounts block"],"tags":["go","daemon","fuse","mount","config"],"backgroundTag":"empty-mount-path","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"}