Yarn install says up to date, yet can't start rails console

This is an old issue, which has been resolved, so I am writing down what I did in the end:

Simply deleting node_modules usually solves the issue. If you are using spring, it also can mess this up, so consider running DISABLE_SPRING=1 rails s to see if that helps


Try restarting spring by running spring stop.

This fixed the issue for me, and meant I didn't need to constantly prefix commands with the spring disable flag.

The above command stops spring: to check that it automatically restarted, run spring status.

Credit to this comment on GitHub for the solution!


You can add in the config/environments/development.rb

this configuration setting

config.webpacker.check_yarn_integrity = false

It also it forget to check yarn integrity on every rails call, as migrations, launching consoles ..., in development environment