【问题标题】:Heroku CLI Error: create is not a heroku commandHeroku CLI 错误:创建不是 heroku 命令
【发布时间】:2018-02-03 17:26:41
【问题描述】:

我之前从终端创建了 heroku 应用程序,但由于某种原因,这对我不起作用:

$ heroku create my-app

我得到以下结果

Refreshing plugins... !
 ▸    semver has no commands. Is this a CLI plugin?
Refreshing plugins... done
Refreshing plugins... !
 ▸    semver has no commands. Is this a CLI plugin?
Refreshing plugins... done
 ▸    create is not a heroku command.
 ▸    Perhaps you meant update
 ▸    Run heroku help for a list of available commands.

我更新了我的brew 以获得最新版本的heroku。当我运行heroku -v 时,我得到:

heroku-cli/6.15.11 (darwin-x64) node-v9.3.0

我也很确定它安装正确。当我运行which heroku 时,我得到:

/usr/local/bin/heroku

一个奇怪的线索似乎是heroku help 给了我以下信息:

Refreshing plugins... !
 ▸    semver has no commands. Is this a CLI plugin?
Refreshing plugins... done
Refreshing plugins... !
 ▸    semver has no commands. Is this a CLI plugin?
Refreshing plugins... done
Usage: heroku COMMAND

Help topics, type heroku help TOPIC for more details:

 auth
 plugins  add/remove CLI plugins

这似乎显然不包括create作为命令之一,所以我需要以某种方式添加create吗?我知道createapps:create 的简写,所以我尝试了两者并得到了相同的结果。

我不确定它是否相关,但我最近更新到 Mac OS High Sierra。

【问题讨论】:

  • 我遇到了与 heroku-cli/6.15.11-5cba33c (linux-x64) node-v9.3.0 类似的问题,我通过更新到 heroku-cli/6.15.13-3dce47c 来修复它(linux-x64) node-v9.3.0 可能不需要。首先,我建议您删除 ~/.local/share/heroku/client 您可以在 heroku/cli/issues/673 中找到

标签: macos heroku homebrew


【解决方案1】:

我遇到了同样的问题。我找到的唯一解决方案是从自制软件中卸载,然后从这里手动安装 heroku-cli 包https://cli-assets.heroku.com/heroku-cli/channels/stable/heroku-cli.pkg 我只是在升级到 High Sierra 后才经历过这种情况。

【讨论】:

    【解决方案2】:
    1. 请确保您的路径变量设置正确
    2. 请确保您已登录自己的帐户。

    您可以从命令行使用以下命令登录:

    $ heroku login
    Email: <your email>
    Password: <your password>
    
    1. 导航到系统中要在本地托管应用程序的根文件夹,然后尝试使用您的命令。

    【讨论】:

      【解决方案3】:

      这最终成为一个比最初预期更大的问题。今天(在尝试了 cmets 中的建议后),我意识到我也遇到了节点问题(我无法在任何地方npm init)。我最终完全重新安装了 macOS。

      如果这不起作用,我erased and reinstalled macOS completely。通过brew重新安装node和heroku后,它确实工作了。

      我知道擦​​除并重新安装 macOS 是一个非常激进的选择,但它似乎没有其他任何工作。我希望那里有更好的答案,但我只是想包括这个,以防其他人偶然发现这个问题。

      【讨论】:

        猜你喜欢
        • 2013-10-09
        • 2016-06-30
        • 2014-08-16
        • 2016-07-29
        • 2019-07-05
        • 2014-06-07
        • 2014-12-12
        • 1970-01-01
        • 2018-12-18
        相关资源
        最近更新 更多