LoginSignup
0
0

More than 1 year has passed since last update.

error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile` のエラー解決方法

Posted at

エラー内容

  • Herokuのデプロイ時に以下エラーが発生。--frozen-lockfileに問題があるのか?
remote:        error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.
remote:        info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ajax-app-37383.git'

error Your lockfile needs to be updated, but yarn was run with --frozen-lockfile..png

やってみたこと

解決方法

  • HEROKUのエラーは黒字の所にもあるので、英語を読んでみるのが良い。以下が書いてあるので、一つずつ実行してみる。
remote:        $ yarn install
remote:        $ git add yarn.lock
remote:        $ git commit -m "Updated Yarn lockfile"
remote:        $ git push heroku main
  • 上記実行したところ、解決!
  • 結論、原因はわからないがyarnに問題があったということ。
    • アプリごとに作成するものだが、ajax_app作成時にエラーになったのか、パソコンの不具合でこうなったのかまでは不明。
  • そして、赤字ばかりにとらわれずにしっかり黒字の部分もみろ!という教訓になりました(;'∀')

新たなるエラー

  • 上記と関係あるかよくわからないが、以下画面になったので解決方法をメモしておく。
    image7.png

  • やってみたこと・解決手順

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