LoginSignup
26
21

More than 3 years have passed since last update.

yarnが原因でdocker-compose runが実行できないときの対処法

Posted at

docker-compose runコマンドを実行すると、以下のエラーが出るようになった。

warning Integrity check: System parameters don't match                                                                                                                                                 
error Integrity check failed                                                                                                                                                                           
error Found 1 errors.                                                                                                                                                                                  


========================================
  Your Yarn packages are out of date!
  Please run `yarn install --check-files` to update.
========================================


To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).


yarn check v1.17.3
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.

原因

調べてみると、yarnのパッケージの中に古いものが存在していることが原因のようでした。
なので、以下のコマンドを実行して yarn をアップグレードしてみる。

$ yarn upgrade

しかし、また同じようなエラーログが出てdocker-compose runが実行できない。

解決方法

最終的に、エラーのログに出ている以下の方法を試しました。

To disable this check, please change `check_yarn_integrity`
to `false` in your webpacker config file (config/webpacker.yml).

要は、「config/webpacker.yml」ファイルのcheck_yarn_integrity箇所をfalseに変更すれば良いと解釈して、実際に変更してみる。

config/webpacker.yml
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
check_yarn_integrity: false

すると、エラーは出なくなりdocker-compose runは実行されるようになりました。

26
21
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
26
21