'Package "drupal/core" is not installed' error even with local drush install

1.2k Views Asked by At

Apols, first time posting, not sure of protocol. I have similar problem to Package "drupal/core" is not installed Trying to install Drush. WAMP, PHP8, Windows 11

I have PATH to..\htdocs\drupal_test3\vendor\drush\drush in User variables in Environment variables I have installed composer in ../htdocs/drupal_test3

./htdocs/drupal_test3
composer --version
Composer version 2.5.8 2023-06-09 17:13:21*

I cd to ../htdocs/drupal_test3/vendor/drush/drush Type drush. I get

../htdocs/drupal_test3/vendor/drush/drush
$ drush --version
 [preflight] Package "drupal/core" is not installed

Help appreciated.

1

There are 1 best solutions below

6
GGSankar On
  1. composer remove drush/drush
  2. composer require drush/drush:^11

The above steps working fine for me