Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
19
Help us understand the problem. What are the problem?

More than 1 year has passed since last update.

posted at

yarnが原因でdocker-compose up ができない ( Your Yarn packages are out of date!)

docker-compose up すると、下記のエラーが発生。解決していきます。

web_1  | => Booting Puma
web_1  | => Rails 6.0.2.1 application starting in development
web_1  | => Run `rails server --help` for more startup options
warning Integrity check: System parameters don't match
error Integrity check failed
error Found 1 errors.
web_1  |
web_1  |
web_1  | ========================================
web_1  |   Your Yarn packages are out of date!
web_1  |   Please run `yarn install --check-files` to update.
web_1  | ========================================
web_1  |
web_1  |
web_1  | To disable this check, please change `check_yarn_integrity`
web_1  | to `false` in your webpacker config file (config/webpacker.yml).
web_1  |
web_1  |
web_1  | yarn check v1.21.1
web_1  | info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
web_1  |
web_1  |
web_1  | Exiting
myapp_web_1 exited with code 1

原因

ローカルでyarnを最新にしていたから整合性が取れなくなったのかな。と考えています。
yarnのパッケージに古いものが含まれているので、アップグレードしてね!といった様子。
なので、

yarn upgrade

これで直るか!と思いましたが、エラー文は変わらず。

結論 check_yarn_integrity: false に変更する

先程のエラー文をもう一度眺める。

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

下記の様に変更。

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

check_yarn_integrity については、
webpacker の check_yarn_integrity オプションについて調べてみた
が参考になります。

再度、 docker-compose up を実行すると、無事起動しました。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
19
Help us understand the problem. What are the problem?