0
0

fnm useコマンドで「error: We can't find the necessary environment variables to replace the Node version.」が出るときの対処法

Posted at

概要

Node.jsの公式のインストール手順で「fnm use」を実行したときに

error: We can't find the necessary environment variables to replace the Node version.

のエラーが出た時の対処法。

解決法

他にもいろいろ提案されている対応策があったが、ここに書いてあることをやれば治った。

fnm use コマンドの前に以下のenvの設定を実行する。

> fnm env --use-on-cd | Out-String | Invoke-Expression

その後、 fnm use 以降を実行することでうまくいく。

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