fastruby / fastruby/setup

Update instructions to include node setup for Apple Silicon laptops

未关闭
#29 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Shell
星标
11
派生
7
PR 合并指标
30 天内没有已合并 PR

描述

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
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。