LoginSignup
0
1

More than 1 year has passed since last update.

win11にしたらエイリアスが使えなくなった。error: `fnm env` was not applied in this context. Can't find fnm's environment variables

Posted at

win11にしたら急に登録してたエイリアスが使えなくなった。

原因は、パワーシェルが読み込むファイルのパスが変わったかららしい。

上記コマンドを実行するとパワーシェル立ち上げ時にどこのファイル読み込んでいるかわかる

$Profile

win10だと
%HOMEPATH%/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
win11だと
%HOMEPATH%/Documents/PowerShell/Microsoft.PowerShell_profile.ps1
になる。

fnmをinstallして使おうと思ったらこのエラーが出た。
Microsoft.PowerShell_profile.ps1にenvの設定してるのにずっと
error: fnm env was not applied in this context. Can't find fnm's environment variables
って出るから、えってなってた。
こういうの気づきにくいからマジやめれ。。

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