nodejs 版本管理工具 fnm 在 windows 系统下的环境变量设置

309 阅读1分钟

假设已经从github 下载 fnm 并放置在 path 环境变量的目录中 PowerShell 在power shell 的profile 文件中添加如下命令到末尾

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

power shell 的环境变量文件可以通过 $PROFILE 查看

Windows 系统 profile 文件在 ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 macOS/Linux, profile 文件在 ~/.config/powershell/Microsoft.PowerShell_profile.ps1

本文由博客一文多发平台 OpenWrite 发布!