fastruby / fastruby/setup

Update instructions to include node setup for Apple Silicon laptops

Ouverte
#29 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Shell
Étoiles
11
Forks
7
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I have a new M1 Mac and following the steps in https://github.com/fastruby/setup/blob/main/mac.sh I wasn't able to get node to work. I've used yarn in the past so I figured I was doing something wrong with nvm, but it turns out you need the latest version of node (16) for Apple Silicon support, and the script is using an older version. See here: https://www.infoworld.com/article/3615673/nodejs-16-introduces-apple-silicon-support.html

Specifically, when I updated my .zshrc file, this happened:
```
~ $ source .zshrc
Please see `nvm --help` or https://github.com/nvm-sh/nvm#nvmrc for more information.
```

So there was an error, but I couldn't tell what it was (the output from the error wasn't being shown for some reason). I tried a variety of things, but eventually figured it out with:

```
~ $ node -v
zsh: bad CPU type in executable: node
```

Also, what I ultimately put in my .zshrc file is different from what's in the mac.sh script. I used what was recommended by homebrew after installing nvm:

```
Add the following to ~/.zshrc or your desired shell
configuration file:

export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Lisez mac.sh et comparez sa configuration de Node et nvm avec la configuration Homebrew ~/.zshrc présentée dans l’issue. Exécutez la configuration sur un Mac Apple Silicon ou inspectez la configuration générée. C’est terminé lorsque les instructions utilisent une version de Node prenant en charge Apple Silicon et évitent les erreurs signalées « source .zshrc » et « bad CPU type ».

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
macos, node.js, shell
Domaine
developer-experience, tooling
Type d'issue
Documentation
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
50/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.