0
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?

node.jsの切り替え

Last updated at Posted at 2023-09-08

うっかりnode.jsを最新版にすると、古いプロジェクト(Vue CLI)で、モジュールの互換性でエラーになることが多々あるので、nvmを使って簡単にバージョン管理しちゃいましょう。
コマンドプロンプトは管理者権限で実行します。

インストールされているバージョン一覧
nvm list
    18.17.0
  * 12.13.0 (Currently using 64-bit executable)
バージョン切り替え
nvm use 18.17.0
  Now using node v18.17.0 (64-bit)
バージョンを指定してインストール
  nvm install 12.13.0

20250411 追記)
新しいnodejs(22系)をwindowsのインストーラーから入れたら上記ができなくなりました🙃
22系をアンインストール、18系をインストール、nvm unistall で12系を削除して再度install
みたいな作業で復元しました。
バージョンアップは上記の通りnvm installが良いかもね!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?