LoginSignup
0
0

More than 1 year has passed since last update.

Node バージョン管理ツール n インストール時にエラー

Posted at

問題

$ brew install n
$ n lts

をすると、以下のエラーが出ました。

Error: sudo required (or change ownership, or define N_PREFIX)

解決法

.bash_profile に以下を追加する。

export N_PREFIX=$HOME/.n
export PATH=$N_PREFIX/bin:$PATH

ターミナルを閉じて、開き直して確認。

$ which node
/Users/[your-user]/.n/bin/node

参考

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