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