1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Docker] docker-compose up でエラーが出た話

Posted at

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!)

1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?