docker-compose up
をすると、以下エラーが出ました。
web_1 | => Booting Puma
web_1 | => Rails 6.0.3.1 application starting in development
web_1 | => Run `rails server --help` for more startup options
web_1 | Usage: yarn [options]
web_1 |
web_1 | yarn: error: no such option: --integrity
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 |
web_1 |
web_1 |
web_1 | Exiting
shitsumonwa_web_1 exited with code 1
上記の画面から、変化せず。。。
Please run yarn install --check-files to update.
とあるので、
yarn install --check-files
をして、再度docker-compose up
をしても同様のエラーが表示されます。
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
の中身を変更しました。
config/webpacker.yml
development:
<<: *default
compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
check_yarn_integrity: true
上記となっていましたが、変更しました。
config/webpacker.yml
development:
<<: *default
compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
# 下記をtrue→falseに変更
check_yarn_integrity: false
ちゃんと動きました!!!
web_1 | => Booting Puma
web_1 | => Rails 6.0.3.1 application starting in development
web_1 | => Run `rails server --help` for more startup options
web_1 | Puma starting in single mode...
web_1 | * Version 4.3.5 (ruby 2.6.3-p62), codename: Mysterious Traveller
web_1 | * Min threads: 5, max threads: 5
web_1 | * Environment: development
web_1 | * Listening on tcp://0.0.0.0:3000
web_1 | Use Ctrl-C to stop
以下記事参照
yarnが原因でdocker-compose up ができない ( Your Yarn packages are out of date!)