Reconfiguing Azure CLI Mode

If by mistake you have changed Azure mode to an unsupported mode, you will not be able to perform any other command until you fix that mode. A message such as this will show:

warn:    No existing command metadata files. Command will run slow.  
error:   ENOENT: no such file or directory, scandir '/usr/local/lib/node_modules/azure-cli/lib/commands/ARM'  

To fix this, all what is needed to do is to change the configuration back. This cannot be done using Azure CLI, however it can be done by editing the config.json file.

vim ~/.azure/config.json  

Change the mode back to arm or asm.

Zaid Daba'een

Read more posts by this author.