{"record":{"id":"6425774ecfe1641e","repo":"jackwener/OpenCLI","slug":"extensions-json-not-found-trae-extensions-json","errorCode":null,"errorMessage":"extensions.json not found: ${TRAE_EXTENSIONS_JSON}","messagePattern":"extensions\\.json not found: (.+?)","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"info","filePath":"clis/trae-solo/workspaces-fs.js","lineNumber":83,"sourceCode":"            Installed: '',\n        }));\n    },\n});\n\n// -------- extensions-list --------\ncli({\n    site: 'trae-solo',\n    name: 'extensions-list',\n    access: 'read',\n    description: 'List VSCode extensions installed in Trae SOLO (~/.trae/extensions/extensions.json). Works while Trae is closed.',\n    domain: 'localhost',\n    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,","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/trae-solo/workspaces-fs.js#L65-L101","documentation":"This CommandExecutionError is thrown by the extensions-list command when the Trae extensions.json file (constant TRAE_EXTENSIONS_JSON) does not exist. It means Trae SOLO has not installed or registered any VSCode-style extensions yet, since that file is only created on first extension installation.","triggerScenarios":"Running extensions-list on a fresh Trae install with no extensions; TRAE_EXTENSIONS_JSON pointing at a wrong/custom extensions path; running as a different OS user so the profile path differs; a Trae update relocating the extensions file.","commonSituations":"CI or a new machine without extension installs; extensions managed by a different profile or channel (Insiders vs stable); portable installs whose data dir is elsewhere; traversal permissions making existsSync return false.","solutions":["Install at least one extension in Trae SOLO so extensions.json is created, then retry","Verify the path in the error message and update TRAE_EXTENSIONS_JSON if it points elsewhere","Search for the actual file (e.g., `find ~/.trae -name extensions.json`) and point the constant at it","Check that the Trae user profile in use matches the path being checked"],"exampleFix":"// before\nif (!fs.existsSync(TRAE_EXTENSIONS_JSON)) {\n    throw new CommandExecutionError(`extensions.json not found: ${TRAE_EXTENSIONS_JSON}`, '');\n}\n// after\nif (!fs.existsSync(TRAE_EXTENSIONS_JSON)) {\n    return []; // no extensions installed yet — treat as empty, not an error\n}","handlingStrategy":"fallback","validationCode":"if (!fs.existsSync(TRAE_EXTENSIONS_JSON)) {\n    console.warn('No extensions installed yet; extensions.json not created.');\n}","typeGuard":null,"tryCatchPattern":"try {\n    const rows = await runExtensionsList();\n} catch (e) {\n    if (/extensions\\.json not found/.test(e.message)) {\n        return []; // no extensions installed\n    }\n    throw e;\n}","preventionTips":["Install at least one extension before expecting extensions.json to exist","Point TRAE_EXTENSIONS_JSON at the correct profile's extensions file","Use the same user profile as the Trae install you are inspecting","After Trae upgrades, re-check the storage layout for path changes"],"tags":["filesystem","extensions","missing-file"],"backgroundTag":"missing-file","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}