{"record":{"id":"3228870d5b8eb556","repo":"spicetify/cli","slug":"extension-not-found","errorCode":null,"errorMessage":"extension not found","messagePattern":"extension not found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/utils/path-utils.go","lineNumber":223,"sourceCode":"\t}\n\n\treturn \"\", errors.New(\"custom app not found\")\n}\n\nfunc GetExtensionPath(name string) (string, error) {\n\textFilePath := filepath.Join(userExtensionsFolder, name)\n\n\tif _, err := os.Stat(extFilePath); err == nil {\n\t\treturn extFilePath, nil\n\t}\n\n\textFilePath = filepath.Join(GetExecutableDir(), \"Extensions\", name)\n\n\tif _, err := os.Stat(extFilePath); err == nil {\n\t\treturn extFilePath, nil\n\t}\n\n\treturn \"\", errors.New(\"extension not found\")\n}\n","sourceCodeStart":205,"sourceCodeEnd":225,"githubUrl":"https://github.com/spicetify/cli/blob/1f13f736163165234eef4fb792a03f9b5b732aa4/src/utils/path-utils.go#L205-L225","documentation":"GetExtensionPath resolves an extension by name to a file inside the <executable-dir>/Extensions directory. It joins the executable directory with \"Extensions\" and the given name, then os.Stat checks existence. If the file does not exist, it returns this error instead of a path. It is the library's way of saying the requested extension is not installed.","triggerScenarios":"Calling GetExtensionPath(name) when no file named `name` exists under GetExecutableDir()/Extensions, or when the Extensions directory itself is missing.","commonSituations":"Typo in the extension name or wrong file extension (e.g. \"mymod\" vs \"mymod.js\"); extension not downloaded/installed yet; custom SPICETIFY_DIR or portable install where Extensions lives elsewhere; a fresh checkout where the Extensions folder was not copied.","solutions":["Verify the exact file name exists: list the Extensions directory next to the spicetify executable.","Install/copy the extension file into <spicetify-executable-dir>/Extensions/.","Check for case-sensitivity mismatches (Linux is case-sensitive).","If using a custom install location, ensure GetExecutableDir() points at the directory that actually contains Extensions."],"exampleFix":"// before\npath, err := utils.GetExtensionPath(\"myext\")\n// after (fail fast with a clear message)\npath, err := utils.GetExtensionPath(\"myext.js\")\nif err != nil {\n    utils.Fatal(fmt.Errorf(\"extension not installed; put myext.js in the Extensions dir: %w\", err))\n}","handlingStrategy":"validation","validationCode":"if _, err := os.Stat(filepath.Join(utils.GetExecutableDir(), \"Extensions\", \"myext.js\")); err != nil {\n    return fmt.Errorf(\"extension myext.js is not installed in Extensions dir\")\n}\npath, err := utils.GetExtensionPath(\"myext.js\")","typeGuard":null,"tryCatchPattern":"if err != nil {\n    if strings.Contains(err.Error(), \"extension not found\") {\n        // install or prompt user\n    }\n    return err\n}","preventionTips":["Keep extension names and file extensions exact and case-consistent.","Ship a setup step that populates the Extensions directory before lookup.","Stat the Extensions dir at startup to detect a broken install layout early."],"tags":["filesystem","extension","path-resolution"],"backgroundTag":"file-not-found","analyzedSha":"1f13f736163165234eef4fb792a03f9b5b732aa4","analyzedAt":"2026-08-31T18:57:59.754Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}