jackwener/OpenCLI · info · EmptyResultError
No extensions installed.
Error message
No extensions installed.
What it means
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.
Source
Thrown at clis/trae-solo/workspaces-fs.js:95
browser: false,
strategy: Strategy.LOCAL,
args: [],
columns: ['Index', 'Workspace Id', 'Kind', 'Target', 'Modified', 'Id', 'Version', 'Source', 'Installed'],
func: async () => {
if (!fs.existsSync(TRAE_EXTENSIONS_JSON)) {
throw new CommandExecutionError(
`extensions.json not found: ${TRAE_EXTENSIONS_JSON}`,
'Trae SOLO has not installed any VSCode extensions yet.',
);
}
let arr;
try {
arr = JSON.parse(fs.readFileSync(TRAE_EXTENSIONS_JSON, 'utf-8'));
} catch (e) {
throw new CommandExecutionError(`Failed to parse extensions.json: ${e.message}`, '');
}
if (!Array.isArray(arr) || !arr.length) {
throw new EmptyResultError('trae-solo extensions-list', 'No extensions installed.');
}
return arr.map((e, i) => {
const ts = e?.metadata?.installedTimestamp;
const installed = ts ? new Date(ts).toISOString().replace('T', ' ').slice(0, 19) : '';
return {
Index: i + 1,
'Workspace Id': '',
Kind: '',
Target: '',
Modified: '',
Id: e?.identifier?.id || '?',
Version: e?.version || '',
Source: e?.metadata?.source || '',
Installed: installed,
};
});
},
});View on GitHub (pinned to 49907e53dc)
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'.
Example fix
// before: assuming the file always has rows
const rows = await runCli('trae-solo extensions-list');
// after: handle the empty case explicitly
let rows;
try {
rows = await runCli('trae-solo extensions-list');
} catch (e) {
if (e.name === 'EmptyResultError') rows = [];
else throw e;
} Defensive patterns
Strategy: fallback
Validate before calling
const fs = require('fs');
const p = require('os').homedir() + '/.trae/extensions/extensions.json';
let count = 0;
try {
const parsed = JSON.parse(fs.readFileSync(p, 'utf-8'));
count = Array.isArray(parsed) ? parsed.length : 0;
} catch { /* missing or unparseable */ }
if (count === 0) console.log('No Trae SOLO extensions installed; skipping extensions-list.'); Type guard
function hasExtensions(value) {
return Array.isArray(value) && value.length > 0;
} Try / catch
try {
const rows = await runCli('trae-solo extensions-list');
} catch (e) {
if (e.name === 'EmptyResultError') {
return []; // zero extensions is a valid state
}
throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No trains found from ${fromStation.name} to ${toStation.name
- NO_DATA
- No Wayback snapshots for "${target}".
- Chess.com has no game archives for ${username}
- Chess.com has games archives for ${username} but no games in
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/51db7ce6955bb1bc.
Report an issue: GitHub.