When I try to run a bin/magento
command, I get this error:
Composer file not found#0 /var/www/html/vendor/magento/framework/Composer/ComposerFactory.php(47): Magento\Framework\Composer\ComposerJsonFinder->findComposerJson()
#1 /var/www/html/vendor/magento/framework/Composer/ComposerInformation.php(368): Magento\Framework\Composer\ComposerFactory->create()
#2 /var/www/html/vendor/magento/framework/Composer/ComposerInformation.php(381): Magento\Framework\Composer\ComposerInformation->getComposer()
#3 /var/www/html/vendor/magento/framework/Composer/ComposerInformation.php(244): Magento\Framework\Composer\ComposerInformation->getLocker()
#4 /var/www/html/vendor/magento/framework/App/ProductMetadata.php(122): Magento\Framework\Composer\ComposerInformation->getSystemPackages()
#5 /var/www/html/vendor/magento/framework/App/ProductMetadata.php(82): Magento\Framework\App\ProductMetadata->getSystemPackageVersion()
#6 /var/www/html/vendor/magento/framework/Console/Cli.php(98): Magento\Framework\App\ProductMetadata->getVersion()
#7 /var/www/html/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
#8 {main}
Here is what I tried so far:
bin/magento clear:cache
&bin/magento cache:flush
- gives the same error above.composer install
- gives the same error above.composer update
- givesComposer could not find a composer.json file in /Users/Ismail/Development/magento2project
How can I fix this issue? Thanks in advance!