Update instructions to include node setup for Apple Silicon laptops

オープン
#29 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
50/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
macos, node.js, shell

調査の方向性

mac.sh を読み、そこにある Node と nvm のセットアップを、issue に示されている Homebrew ~/.zshrc の設定と比較してください。Apple Silicon Mac でセットアップを実行するか、生成された設定を確認してください。Node の Apple Silicon 対応バージョンを手順で使用し、報告されている「source .zshrc」および「bad CPU type」エラーを回避できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Shell
スター
11
フォーク
7
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。