Set up nvm in Rosetta using Homebrew
- Add this to VSCode settings:
"x86 zsh 💻": {
"path": "/usr/bin/arch",
"args": ["-arch", "x86_64", "/bin/zsh"]
}
- Use the x86 zsh to install Homebrew
- Use
/usr/local/bin/brew
to install nvm
- Set up brew-x86 alias and nvm in
~/.zshrc
:
alias brew-x86="/usr/local/bin/brew"
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
- Reinstall node_modules in projects using the x86 terminal (using the ARM install of Yarn seems to be okay)
Fish setup
- Use
brew-x86
in ZSH to install fish
- Add this to VSCode settings:
"x86 fish 🐟": {
"path": "/usr/bin/arch",
"args": ["-arch", "x86_64", "/usr/local/bin/fish"]
}
- Run this in x86 fish to add the brew-x86 alias:
alias -s brew-x86="/usr/local/bin/brew"
- Follow steps in nvm on mac for fish users (but use
brew-x86
)