powershell - heroku : The term 'heroku' is not recognized as the name of a cmdlet, 函数、脚本文件或可运行的程序

标签 powershell heroku

我安装了heroku。我将 bin 文件夹路径设置为环境变量。我一直在尝试运行命令:heroku -v在我的 Visual Studio Code 文本编辑器中。但我收到以下错误:

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

最佳答案

从安装程序正确安装 Heroku CLI 后,在 VS 代码终端中运行 Heroku 命令需要做的另一件事是从 npm 安装 Heroku 包。为此,请使用以下命令:

npm install -g heroku
现在,要验证您的 CLI 安装,您可以使用 heroku -vheroku --version命令。

关于powershell - heroku : The term 'heroku' is not recognized as the name of a cmdlet, 函数、脚本文件或可运行的程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60786201/

相关文章:

node.js - 来自 GitHub 的 DigitalOcean 上的简单 Node.js 应用程序部署

windows - 为什么这个逻辑不能按预期过滤掉数据?

powershell - 如何扩展 Write-Host 或双引号中的成员变量?

arrays - Powershell数组长度

powershell - 在 PowerShell 中将输出转换为 HTML 格式

node.js - 将 Sails.js 应用程序部署到 Heroku?

node.js - heroku 如何将请求路由到正确的端口?

heroku - 数据库 "postgres"详细信息 : User does not have CONNECT privilege 的权限被拒绝

Azure DevOps Powershell 脚本无法创建 SSL/TLS 安全通道

javascript - 使用Python脚本的Heroku Node.js