Recently i upgraded drupal 8.8.6 to 8.9.0. After the composer update finished i tried to run
vendor/bin/drush cr but i got these errors
PHP Warning: require(/Users/nikitasmichalakis/www/d8project/vendor/bin/drush.php): failed to open stream: No such file or directory in /Users/nikitasmichalakis/www/d8project/vendor/bin/drush on line 4
and then this warning too
Fatal error: require(): Failed opening required '/Users/nikitasmichalakis/www/d8project/vendor/bin/drush.php' (include_path='.:/usr/local/Cellarfirstname.lastname@example.orgemail@example.com/pear') in /Users/nikitasmichalakis/www/d8project/vendor/bin/drush on line 4
I searched a little on the web but with no luck.
I checked the vendor/bin/drush file and realized that the __DIR__ '/drush.php' path was wrong. Another issue was that there was no linked alias anymore for the drush.php file.
nikitass-mbp:dimos nikitasmichalakis$ ls -la vendor/bin/drush
lrwxr-xr-x 1 nikitasmichalakis staff 20 Apr 22 11:54 vendor/bin/drush -> ../drush/drush/drush
So i decided to remove the bin/drush file and the vendor/bin/drush folder run composer/update again and problem was fixed.
I guess sometimes you have to "reinstall" drush.