LoginSignup
meb4427
@meb4427 (えば)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

【Rails】Herokuのアップデートを完了させたい

Warning: heroku update available from 7.59.2 to 7.59.3.の表示が消えない。

現在,Railsチュートリアルに沿って,Webアプリをつくっています。

この状況を受け,https://qiita.com/ikkorokoro/items/6854ac9192c09a33b127を参考に,下記2通りの対処を行いましたが,解決に至っておりません。

①$Heroku update

heroku: Updating CLI... already on latest version: 7.59.2
Updating completions... done

となり,動作は停止。

②$npm update -g heroku

NameError (uninitialized constant World)

または、問題・エラーが起きている画像をここにドラッグアンドドロップ

$npm update -g heroku

npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sadanorimaeba/.npm/_logs/2022-03-08T13_54_54_088Z-debug.log
~/Desktop/explore/environment/explore smeb_macpro $heroku update
heroku: Updating CLI... already on latest version: 7.59.2
Updating completions... done
~/Desktop/explore/environment/explore smeb_macpro $npm update -g heroku  
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sadanorimaeba/.npm/_logs/2022-03-08T13_59_02_224Z-debug.log
~/Desktop/explore/environment/explore smeb_macpro $heroku update
heroku: Updating CLI... already on latest version: 7.59.2
Updating completions... done
~/Desktop/explore/environment/explore smeb_macpro $npm update -g heroku 
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sadanorimaeba/.npm/_logs/2022-03-08T14_03_00_277Z-debug.log
~/Desktop/explore/environment/explore smeb_macpro $Heroku update
heroku: Updating CLI... already on latest version: 7.59.2
Updating completions... done
~/Desktop/explore/environment/explore smeb_macpro $npm update -g heroku
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sadanorimaeba/.npm/_logs/2022-03-08T14_17_42_191Z-debug.log

以上までで,次に何をすればよいか,分かりかねております。
ご存じの方から,ご助言いただけますと幸いです。
よろしくお願いいたします。

0

1Answer

heroku コマンドのインストール方法は複数あり、どのようにインストールしたかによってアップデート方法も異なります。詳しくは公式のマニュアルを参照してください。
https://devcenter.heroku.com/ja/articles/heroku-cli

その現象は Mac を使っていて Homebrew で heroku をインストールした場合に起きます。これは Homebrew 経由で配布されている heroku のバージョンが現時点でまだ7.59.2なせいです。アップデートを実行してもそれ以上には上がりませんが、最新バージョンのチェック処理は(Homebrew 以外の方法ではもう配布されている)7.59.3を検出して警告を出してしまいます。

警告は無視しても問題ありません。 Homebrew で配布されるバージョンは数日程度で更新されるはずなので、後日アップデートすれば成功すると思います。

なお、 Homebrew でインストールした場合のアップデート方法は heroku update または brew upgrade heroku (どちらでも OK)です。 npm update -g heroku は別の方法でインストールしたときしか使えません。

1

Comments

  1. @meb4427

    Questioner
    承知しました!
    時間の問題として捉え,しばらく後に再度試してみます。
    `update`の仕方も教えていただきありがとうございました!

Your answer might help someone💌