fish shell でnode バージョンを永久的に最新版にする方法が知りたい

質問内容

提示のコンソールログですがnvmを用いてnodeを最新版に切り替えたいのでのですが参考サイト通りにやってもエラーでてしまいます。
これは何が原因なのでしょうか?

知りたいこと

永久的にバージョンを切り替える正規のやり方が知りたい。
コマンドがエラーになる原因が知りたい

行ったこと

1,参考サイトAのサイトを参考に同じように行い、Gihubサイトの必要な物をすべてインストールしましたが下記のエラーコンソールが表示されます。
2,config.fishファイルにnvm use v21.5.0というコードを書いて起動時に一時的に設定する設定を書いて事実上の永久設定を行う事で
設定しているのですが、本来のやり方ではないと思うんで質問しました。
3,nvm -h を見ると exmple部にaliasというコマンドがないのでバージョンの関係で削除されたと思われます。

参考サイト

A: https://saki-htr.hatenablog.com/entry/2021/08/12/180228#Node%E3%81%A8Nodejs%E3%81%AE%E9%81%95%E3%81%84%E3%81%AF

環境

OS: ubnutu 20.4
shell: fitsh
フレームワーク:on my fish

エラーコンソール
$ nvm alias default nvm: Unknown command or option: "alias" (see nvm -h for usage)
一時的に設定
$ nvm use v21.5.0 Now using Node v21.5.0 (npm 10.2.4) ~/.local/share/nvm/v21.5.0/bin/node $~/.c/fish  node -v v21.5.0
nvm -h
nvm -h Usage: nvm install <version> Download and activate the specified Node version nvm install Install the version specified in the nearest .nvmrc file nvm use <version> Activate the specified Node version in the current shell nvm use Activate the version specified in the nearest .nvmrc file nvm list List installed Node versions nvm list-remote List available Node versions to install nvm list-remote <regex> List Node versions matching a given regex pattern nvm current Print the currently-active Node version nvm uninstall <version> Uninstall the specified Node version Options: -s, --silent Suppress standard output -v, --version Print the version of nvm -h, --help Print this help message Variables: nvm_arch Override architecture, e.g. x64-musl nvm_mirror Use a mirror for downloading Node binaries nvm_default_version Set the default version for new shells nvm_default_packages Install a list of packages every time a Node version is installed Examples: nvm install latest Install the latest version of Node nvm use 14.15.1 Use Node version 14.15.1 nvm use system Activate the system's Node version

コメントを投稿

0 コメント