{"record":{"id":"894a01ecee9aaa63","repo":"GopeedLab/gopeed","slug":"manifest-json-not-found","errorCode":null,"errorMessage":"manifest.json not found","messagePattern":"manifest\\.json not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/download/extension.go","lineNumber":33,"sourceCode":"\t\"github.com/GopeedLab/gopeed/pkg/base\"\n\t\"github.com/GopeedLab/gopeed/pkg/download/engine\"\n\tgojaerror \"github.com/GopeedLab/gopeed/pkg/download/engine/inject/error\"\n\tgojautil \"github.com/GopeedLab/gopeed/pkg/download/engine/util\"\n\tenginewebview \"github.com/GopeedLab/gopeed/pkg/download/engine/webview\"\n\t\"github.com/GopeedLab/gopeed/pkg/util\"\n\t\"github.com/dop251/goja\"\n\t\"github.com/go-git/go-git/v5\"\n\t\"github.com/go-git/go-git/v5/plumbing/transport\"\n)\n\nvar (\n\tgitSuffix = \".git\"\n\n\ttempExtensionsDir   = \".extensions\"\n\textensionsDir       = \"extensions\"\n\textensionIgnoreDirs = []string{gitSuffix, \"node_modules\"}\n\n\tErrExtensionNoManifest = fmt.Errorf(\"manifest.json not found\")\n\tErrExtensionNotFound   = fmt.Errorf(\"extension not found\")\n)\n\ntype ActivationEvent string\n\nconst (\n\tEventOnResolve ActivationEvent = \"onResolve\"\n\tEventOnStart   ActivationEvent = \"onStart\"\n\tEventOnError   ActivationEvent = \"onError\"\n\tEventOnDone    ActivationEvent = \"onDone\"\n)\n\nfunc (d *Downloader) InstallExtensionByGit(url string) (*Extension, error) {\n\treturn d.fetchExtensionByGit(url, d.InstallExtensionByFolder)\n}\n\nfunc (d *Downloader) InstallExtensionByFolder(path string, devMode bool) (*Extension, error) {\n\text, err := d.parseExtensionByPath(path)","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/GopeedLab/gopeed/blob/7b7327ffb30816273a74b142cccc0bc10c5a4c67/pkg/download/extension.go#L15-L51","documentation":"ErrExtensionNoManifest is returned by parseExtensionByPath when the target folder has no manifest.json at its root. The folder is either the local path given to InstallExtensionByFolder or the git clone temp dir joined with the sub-path parsed from an install URL (github.com/<user>/<repo>/tree/<ref>/<subdir>). It is the first check of extension installation, so any structural mistake in the repo layout fails here.","triggerScenarios":"InstallExtensionByGit('https://github.com/user/repo') when the repo root has no manifest.json (it lives in a subfolder); an install URL with /tree/main/packages/ext where the manifest sits elsewhere; InstallExtensionByFolder('/wrong/dir') or on a folder where manifest.json is misnamed (Manifest.json, manifest.json.txt).","commonSituations":"Monorepos hosting the extension in a subdirectory; cloning a template repo and moving files; case-sensitive filesystems after copying from macOS/Windows; .gitignore accidentally excluding manifest.json.","solutions":["Verify manifest.json exists at the exact folder root you pass/sub-path you reference (os.Stat it first)","For subdirectory extensions, install with the full /tree/<branch>/<subdir> URL pointing at the folder containing manifest.json","Check spelling/case of the filename on case-sensitive systems"],"exampleFix":"# before\ngopeed install https://github.com/user/monorepo # no manifest at root\n# after\ngopeed install https://github.com/user/monorepo/tree/main/packages/my-extension","handlingStrategy":"validation","validationCode":"// Go: verify layout before installing\nif _, err := os.Stat(filepath.Join(folder, \"manifest.json\")); err != nil {\n    return fmt.Errorf(\"folder %s has no manifest.json: fix the path or repo subdirectory\", folder)\n}\n_, err := downloader.InstallExtensionByFolder(folder, false)","typeGuard":null,"tryCatchPattern":"if err == ErrExtensionNoManifest { /* errors.Is on older Go */ }","preventionTips":["Keep manifest.json at the exact root you install from (or reference the /tree sub-path)","Watch filename case on case-sensitive filesystems","Ensure .gitignore does not exclude manifest.json"],"tags":["extension","manifest","install","filesystem"],"backgroundTag":null,"analyzedSha":"7b7327ffb30816273a74b142cccc0bc10c5a4c67","analyzedAt":"2026-08-16T02:51:03.250Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}