2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fish シェル起動時に anyenv がエラーを吐く

Posted at

ターミナル環境を zsh -> fish へ移行作業しているのですが、fish 起動時に anyenv の初期化でエラーが出るという症状が発生しました。

環境

  • macOS 10.14.6
  • 以前の環境 (zsh) で anyenv を構築済

結論

ndenv をアンインストールすることで解決しました。

anyenv uninstall ndenv

やったこと

anyenv を読み込むために、 config.fish に次のように書きました。

.config/fish/config.fish
set -x PATH ~$HOME/.anyenv/bin $PATH
status --is-interactive; and source (anyenv init -|psub)

その後、シェルを再読み込みするとエラーが発生。

$ exec fish -l
/var/folders/r8/3l845qrs2vlg1v_hzb8vpkgr0000gn/T//.psub.FB7rqmdEou (line 1): Unexpected ')' found, expecting '}'
... 略 ...

ndenv() {
  typeset command
  command="$1"
  if [ "$#" -gt 0 ]; then
    shift
  fi

  case "$command" in
  rehash|shell)
^

... 略 ...

調べたところ、 ndenv はもうメンテナンスされておらず、nodenv への移行が推奨されていました。

[Deprecated] nodenv is better alternative
Please consider to use nodenv. ndenv repository is not maintained actively.

引用元:riywo/ndenv: node.js version manager based on rbenv

nodenv/nodenv: Manage multiple NodeJS versions.

ndenv を消し、 nodenv に切り替えたところエラーが出なくなりました。

anyenv uninstall ndenv
anyenv install nodenv
2
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?