Skip to content

Error Codes

Every venpm error includes a structured ErrorInfo object with a machine-readable code, human message, and actionable suggestion.

ErrorInfo Structure

typescript
interface ErrorInfo {
  code: string;        // Machine-readable error code
  message: string;     // Human-readable description
  suggestion?: string; // Actionable next step
  candidates?: string[]; // Fuzzy-matched alternatives
  docsUrl?: string;    // Link to documentation
}

In the terminal, errors render as:

✖ Plugin "BeterVolume" not found in any configured repo
  ⟩ Did you mean: BetterVolume
                                              [PLUGIN_NOT_FOUND]

In --json mode, the error is in the envelope's error field. In --json-stream, it's the final event.

Error Code Reference

Plugin Errors

CodeWhenDefault Suggestion
PLUGIN_NOT_FOUNDPlugin name not in any configured repovenpm search <query> + fuzzy candidates
PLUGIN_AMBIGUOUSPlugin found in multiple repos without --fromvenpm install <plugin> --from <repo>
PLUGIN_NOT_INSTALLEDUninstall or update targets a plugin that isn't installedvenpm list

Environment Errors

CodeWhenDefault Suggestion
VENCORD_NOT_FOUNDVencord source path not configured or detectedvenpm config set vencord.path /path/to/Vencord
GIT_NOT_AVAILABLEGit required for clone but not foundInstall git, or use --tarball
PNPM_NOT_AVAILABLEpnpm required for Vencord rebuildnpm i -g pnpm
DISCORD_NOT_FOUNDDiscord binary not found for restartvenpm config set discord.binary /path/to/discord
BUILD_FAILEDVencord pnpm build failedvenpm doctor

Resolution Errors

CodeWhenDefault Suggestion
CIRCULAR_DEPENDENCYDependency graph contains a cycleError message shows the cycle path
VERSION_NOT_FOUND--version specifies a version that doesn't existvenpm info <plugin>

Validation Errors

CodeWhenDefault Suggestion
SCHEMA_INVALIDplugins.json fails schema validationvenpm validate --strict

Other Errors

CodeWhenDefault Suggestion
REPO_FETCH_FAILEDHTTP error fetching a repo's plugin indexvenpm repo list
NON_INTERACTIVEInteractive prompt needed but no TTY available--yes to auto-confirm, or set config values explicitly

Exit Code Categories

Error codes map to exit code categories:

Exit CodeCategoryError Codes
0Success
1Command ErrorPLUGIN_NOT_FOUND, PLUGIN_AMBIGUOUS, PLUGIN_NOT_INSTALLED, CIRCULAR_DEPENDENCY, VERSION_NOT_FOUND, SCHEMA_INVALID, REPO_FETCH_FAILED, NON_INTERACTIVE
2Usage ErrorBad arguments (handled by commander)
3Environment ErrorVENCORD_NOT_FOUND, GIT_NOT_AVAILABLE, PNPM_NOT_AVAILABLE, DISCORD_NOT_FOUND, BUILD_FAILED

Fuzzy Matching

When a PLUGIN_NOT_FOUND error occurs, venpm computes Levenshtein distance against all known plugin names and suggests close matches:

  • Single match: "Did you mean: BetterVolume"
  • Multiple matches: "Did you mean one of: BetterVolume, VolumeBooster"

In JSON output, the candidates are in the candidates array:

json
{
  "code": "PLUGIN_NOT_FOUND",
  "message": "Plugin \"BeterVolume\" not found",
  "suggestion": "Did you mean: BetterVolume",
  "candidates": ["BetterVolume"]
}

This also applies to repo names (--from) and config keys (venpm config get/set).

Handling Errors Programmatically

bash
# Parse error code from --json output
result=$(venpm install badPlugin --json 2>/dev/null)
code=$(echo "$result" | jq -r '.error.code // empty')

case "$code" in
  PLUGIN_NOT_FOUND)
    echo "Plugin not found. Suggestions: $(echo "$result" | jq -r '.error.candidates[]')"
    ;;
  VENCORD_NOT_FOUND)
    echo "Configure Vencord: venpm config set vencord.path /path"
    ;;
  *)
    echo "Error: $(echo "$result" | jq -r '.error.message')"
    ;;
esac

Disclaimer — Not affiliated with Discord Inc. or Vencord. Client mods are against Discord's ToS. Use at your own risk.