0
0

More than 1 year has passed since last update.

M1 Mac で nコマンドが invalid version になる

Posted at

はじめに

完全な備忘録です。

事象

M1 Mac で Node のバージョン切り替えコマンド n を使って、新しいバージョンをインストールしようとすると以下のようなエラーが出る。

n 16.13.0

     install : node-v16.13.0

  Error: invalid version 16.13.0

n list で確認すると、16.13.0は存在している。

解決策

ここにIssueが上がっていた。

M1 Mac では、--arch x64 が必要なようだ。

n --arch x64 16.13.0

     install : node-v16.13.0
       mkdir : /usr/local/n/versions/node/16.13.0
       fetch : https://nodejs.org/dist/v16.13.0/node-v16.13.0-darwin-x64.tar.gz
######################################################################### 100.0%
   installed : v16.13.0 

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0