0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

heroku コマンドを使用しようとした時のエラー

Posted at

##エラー発生状況
デプロイ後、アプリを開くとエラーが出たため herokuのログを見るためコマンドを打つと以下のエラーが発生した

##エラー内容

$ heroku logs
 ›   Warning: heroku update available from 7.45.0 to 7.47.4.
 ›   Error: Missing required flag:
 ›     -a, --app APP  app to run command against
 ›   See more help with —help

##解決策
エラー文の

Warning: heroku update available from 7.45.0 to 7.47.4.
 ›   Error: Missing required flag:

で検索を行い以下の参考記事から
https://reasonable-code.com/heroku-update/

 Warning: heroku update available from X.X.X to Y.Y.Y 

とエラーが出た時は

Heroku update

 を打つことで解決できる

だが上記でも解決できない場合がある

$ heroku update
 ›   Warning: update with: "npm update -g heroku"
heroku: Updating CLI... not updatable
Updating completions… done

これが出た場合はnpm update -g herokuを実行すると解決できる

 $ npm update -g heroku
/usr/local/opt/nvm/versions/node/v14.3.0/bin/heroku -> /usr/local/opt/nvm/versions/node/v14.3.0/lib/node_modules/heroku/bin/run
+ heroku@7.47.4
added 3 packages from 2 contributors, removed 13 packages and updated 60 packages in 32.884s
$ heroku version
heroku/7.47.4 darwin-x64 node-v14.3.0

これでheroku コマンドが使えるようになる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?