我安装了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 -v
或 heroku --version
命令。
关于powershell - heroku : The term 'heroku' is not recognized as the name of a cmdlet, 函数、脚本文件或可运行的程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60786201/