A skill that troubleshoots when an error occurs with the mir CLI.
Trigger
Use when the user encounters an error while running a mir command, or wants to investigate the cause of an error.
Error list and remedies
SnippetNotFoundError
snippet not found.
.mir/snippets/<name>.yamlと.mir/snippets/<name>/directory'sbothcheck whether exists- it does not work with only one
- check whether there is a typo in the snippet name
snippet name is invalid
^[a-zA-Z0-9][a-zA-Z0-9-]*$check whether it follows- alphanumeric characters and hyphens only, starting with an alphanumeric character
RegistryNotFoundError
registry not found.
mirconfig.yamlのregistriescheck the settings--registrycheck whether the name specified in existsmir listcheck the registries available in
FileConflictError
a file with the same name already exists at the install destination.
- when run in interactive mode, an overwrite confirmation prompt is displayed (yes/no/all)
--no-interactivewhen using, overwriting is skipped (--safesame as)- or manually move the existing file aside and then rerun
PathTraversalError
the template file name contains .. .
- check whether the file path in the template directory contains
..check that it does not contain - fix the template file path
variable not specified (non-interactive mode)
--no-interactive a required variable is not specified when using.
- specify with the CLI argument
--変数名=値specify - or set in the variable definitions of snippet.yaml
defaultset
publish to remote registry failed
| HTTP status | Cause | Remedy |
|---|---|---|
| 401 | publish_token is invalid |
reacquire the token and mirconfig.yaml update |
| 403 | insufficient permissions | check the token's permissions |
| 409 | a snippet with the same name exists | --force publish with overwrite using |
YAML validation error
snippet.yamlがschema/v1/snippet.schema.jsoncheck whether it conforms to- required field
namecheck whether is set namecheck whether the field matches the file name
Procedure
- check the error message
- identify the corresponding error from the list above
- fix it according to the remedy
- after fixing, rerun the command and check that it works
if it cannot be resolved
mir --helpやmir <command> --helpcheck the command usage with- if it still cannot be resolved, open an issue on GitHub: https://github.com/TBSten/mir/issues