{"record":{"id":"51db7ce6955bb1bc","repo":"jackwener/OpenCLI","slug":"no-extensions-installed","errorCode":null,"errorMessage":"No extensions installed.","messagePattern":"No extensions installed\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"info","filePath":"clis/trae-solo/workspaces-fs.js","lineNumber":95,"sourceCode":"    browser: false,\n    strategy: Strategy.LOCAL,\n    args: [],\n    columns: ['Index', 'Workspace Id', 'Kind', 'Target', 'Modified', 'Id', 'Version', 'Source', 'Installed'],\n    func: async () => {\n        if (!fs.existsSync(TRAE_EXTENSIONS_JSON)) {\n            throw new CommandExecutionError(\n                `extensions.json not found: ${TRAE_EXTENSIONS_JSON}`,\n                'Trae SOLO has not installed any VSCode extensions yet.',\n            );\n        }\n        let arr;\n        try {\n            arr = JSON.parse(fs.readFileSync(TRAE_EXTENSIONS_JSON, 'utf-8'));\n        } catch (e) {\n            throw new CommandExecutionError(`Failed to parse extensions.json: ${e.message}`, '');\n        }\n        if (!Array.isArray(arr) || !arr.length) {\n            throw new EmptyResultError('trae-solo extensions-list', 'No extensions installed.');\n        }\n        return arr.map((e, i) => {\n            const ts = e?.metadata?.installedTimestamp;\n            const installed = ts ? new Date(ts).toISOString().replace('T', ' ').slice(0, 19) : '';\n            return {\n                Index: i + 1,\n                'Workspace Id': '',\n                Kind: '',\n                Target: '',\n                Modified: '',\n                Id: e?.identifier?.id || '?',\n                Version: e?.version || '',\n                Source: e?.metadata?.source || '',\n                Installed: installed,\n            };\n        });\n    },\n});","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/trae-solo/workspaces-fs.js#L77-L113","documentation":"The `trae-solo extensions-list` command reads Trae SOLO's extensions.json (a VSCode-style extension registry file). This error is thrown as an EmptyResultError when the file exists and parses successfully but contains an empty array (or non-array content), meaning no VSCode extensions are registered in Trae SOLO. It signals a valid-but-empty state, not a failure to locate or parse the file.","triggerScenarios":"Running `trae-solo extensions-list` when ~/.trae/extensions/extensions.json parses to an empty array `[]` (or to a non-array value) — i.e. Trae SOLO is installed but no extensions have ever been installed into it.","commonSituations":"A fresh Trae SOLO install with zero extensions; the user recently cleared the extensions directory; extensions were installed into a different Trae edition (TRAE vs TRAE SOLO) so SOLO's extensions.json stays empty; a corrupted extensions.json whose top level is not an array.","solutions":["Install at least one extension in Trae SOLO (open the IDE, use the extensions marketplace), then rerun `trae-solo extensions-list`.","Confirm TRAE_EXTENSIONS_JSON points at the Trae SOLO profile you actually use; if you use regular TRAE, the SOLO extensions.json will remain empty.","Inspect the file directly (`cat ~/.trae/extensions/extensions.json`); if the top level is not an array, the file is malformed and should be regenerated by Trae.","If you only need to check the file location/health, note that a missing file raises CommandExecutionError instead — treat EmptyResultError as 'file OK, zero extensions'."],"exampleFix":"// before: assuming the file always has rows\nconst rows = await runCli('trae-solo extensions-list');\n// after: handle the empty case explicitly\nlet rows;\ntry {\n  rows = await runCli('trae-solo extensions-list');\n} catch (e) {\n  if (e.name === 'EmptyResultError') rows = [];\n  else throw e;\n}","handlingStrategy":"fallback","validationCode":"const fs = require('fs');\nconst p = require('os').homedir() + '/.trae/extensions/extensions.json';\nlet count = 0;\ntry {\n  const parsed = JSON.parse(fs.readFileSync(p, 'utf-8'));\n  count = Array.isArray(parsed) ? parsed.length : 0;\n} catch { /* missing or unparseable */ }\nif (count === 0) console.log('No Trae SOLO extensions installed; skipping extensions-list.');","typeGuard":"function hasExtensions(value) {\n  return Array.isArray(value) && value.length > 0;\n}","tryCatchPattern":"try {\n  const rows = await runCli('trae-solo extensions-list');\n} catch (e) {\n  if (e.name === 'EmptyResultError') {\n    return []; // zero extensions is a valid state\n  }\n  throw e;\n}","preventionTips":["Treat EmptyResultError from *-list commands as valid empty data, not a failure.","Check ~/.trae/extensions/extensions.json exists and is a non-empty array before invoking the command in scripts.","Remember TRAE vs TRAE SOLO keep separate extension stores; point checks at the right profile."],"tags":["empty-result","trae-solo","local-state","no-data"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}