20
14

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.

【解決】Your Yarn packages are out of date! Please run `yarn install` to update.

Last updated at Posted at 2019-05-26

yarn installするとYour Yarn packages are out of date! Please run yarn install to update.(あなたのヤーンパッケージは古くなっています!更新するには yarn install を実行してください)の解決策。エラー文通りyarn installしたんだけど、なんだこれイタチごっこじゃん、、、

エラー文

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


To disable this check, please add `config.webpacker.check_yarn_integrity = false`
to your Rails development config file (config/environments/development.rb).


yarn check v1.16.0
error Lockfile does not contain pattern: "bootstrap@^4.3.1"
error Lockfile does not contain pattern: "jquery@^3.4.1"
error Couldn't find an integrity file
error Found 3 errors.
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.

解決策

node_modulesを削除

$ rm -rf node_modules/

yarn.lockファイルを削除

$ rm -rf yarn.lock

yarnをインストール

$ yarn install

yarnをアップグレード

$ yarn upgrade

あとはサーバー起動できれば

$ rails s

以上です!

https://qiita.com/nakki/items/4fa58cb6ff4d6c24c2d2
https://classic.yarnpkg.com/en/docs/cli/upgrade/
https://motomichi-works.hatenablog.com/entry/2020/04/23/115936

20
14
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
20
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?