Fluent Terminal安装Nodejs提示:The term 'nodejs' is not recognized as the name of a cmdlet

Windows平台下使用Fluent Terminal安装Nodejs提示:The term 'nodejs' is not recognized as the name of a cmdlet

错误详细:

nodejs : The term 'nodejs' is not recognized as the name of a cmdlet, function, script file, or operable pro
gram. Check the spelling of the name, or if a path was included, verify that the path is correct and try aga
in.
At line:1 char:1
+ nodejs
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (nodejs:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

原因如下:

  1. 没有设置环境变更
    使用
$env:path -split ';' | Select-String nodejs

查看 Nodejspath,并添加到用户环境变量

# 1. 快捷键
cmd+r
# 2. 输入
sysdm.cpl
# 3. 点击切换到 Advanced,再点击 Environment Variables
# 4. 找到 path ,点击 New

重启 Powershell 或者 Fluent Terminal ,然后重启 explore

  1. windows下Powershellcmd 只支持 32bit
    卸载原Nodejs,并使用:
scoop install -a 32bit nodejs

成功!

你可能感兴趣的:(Fluent Terminal安装Nodejs提示:The term 'nodejs' is not recognized as the name of a cmdlet)