App Academy

Error setting up VS Code- Unknown command: cask

Hey Everyone!

Anyone run into this problem while trying to install VS Code? Any help is appreciated!

“Error: Unknown command: cask”

Hi Virginia,

I looked at Stack Overflow and found some updated guidance for 2021. This answer seems to work for folks using Catalina and the M1.

Give this a shot, replacing myprogram with visual-studio-code and let me know if it works for you.
Jesse

1 Like

Hi Jesse, thanks for your help!

I tried replacing “myprogram” to no avail, but what did finally work was me simply entering the command “brew install visual-studio-code” (leaving out the word “cask” since that seemed to be the issue each time). I attached a screenshot for anyone that may have this issue in the future.

Thanks again for your help! I’m sure I’ll be needing it again during my next install! :sweat_smile:

2 Likes

Virginia - thank you for following up with your solution! It appears that Homebrew just released a new version this month, and some of the commands have been deprecated. Thank you for pointing out the issue - we will make sure we get the word out to other students.
Jesse

2 Likes