Setting up my development environment on a new M1 MacBook

If you’re like me — a junior developer who just bought a new MacBook with the latest M1 chip to continue building your coding skills — you’re in luck! You’re not alone in wondering why setting up your development environment through HomeBrew in Bash is such a challenge. Nothing is a fire and this challenge too shall pass… according to Apple, more or less.

HomeBrew is a terminal app that, as far as I know at this moment, does not fully offer Apple ARM (M1 chip) support yet.

Developers far more experienced than I have posted some helpful blogs about their process in setting up their development environments and I’ll link their articles below as well as document the combination of steps that worked for me.

# Link 1: https://soffes.blog/homebrew-on-apple-silicon

  • If you’d like to use Homebrew, you’ll have to install it with rosetta 2, using the command provided in the article above.

<touch ~/.zshrc>
<open ~/.zshrc>
and entered this line: <alias ibrew=‘arch -x86_64 /usr/local/bin/brew’>

# Link 2: https://apple.stackexchange.com/questions/388622/zsh-zprofile-zshrc-zlogin-what-goes-where

  • This link is helpful in explaining the differences among:
    .zprofile
    .zshenv
    .zshrc
    .zlogin
    .zlogout

** You should be able to install other packages that you would have normally installed with brew in the past. The only other thing I want to note is that the latest Node version supports M1 (version 15.3.0). I found this out when I tried to create a React App and got a JS allocation error while I was using version 15.2.1.

After installing NVM, run:
<nvm install 15.3.0>
<nvm alias default 15.3.0>
<nvm use 15.3.0>

Hopefully these steps help you set the HomeBrew foundations you’d need on your new MacBook. There are a number of ways out on the interwebz that outline installing packages natively without HomeBrew, as well. Feel free to share any resources on that if you have them, as I’d love to check those out!

Happy coding!

-Ruby

--

--

Software Engineer | Teacher |Artist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store