Update instructions to include node setup for Apple Silicon laptops

Abierto
#29 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
50/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
macos, node.js, shell

Línea de trabajo

Lee mac.sh y compara su configuración de Node y nvm con la configuración de Homebrew ~/.zshrc mostrada en la issue. Ejecuta la configuración en un Mac con Apple Silicon o inspecciona la configuración generada. Se considera terminado cuando las instrucciones usan una versión de Node compatible con Apple Silicon y evitan los errores indicados «source .zshrc» y «bad CPU type».

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

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
Lenguaje dominante
Shell
Estrellas
11
Forks
7
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.