Composer could not find a composer.json
To install composer and add to your global path:
curl -sS https://getcomposer.org/installer | phpmv composer.phar /usr/local/bin/composer
run these in terminal. It does say if you get an error that usr doesn't exist, you do need to manually make it. I know an answer was selected, so this is for anyone who may see this in the future, as i am sometimes, and don't want to be advised to visit yet another site. Its simple just two lines, might have to be in sudo if you have permission error
In my case, I did not copy all project files to the folder where I was running composer install
. So do:
- Copy your project files (including the
composer.json
) to folder - open CMD (I am using ConEmu), navigate to the new folder, run
composer install
from there - It should work or throw errors in case the json file is not correct.
If you just want to make composer run, create a new composer.json
file with for example:
{ "require": { "php": ">=5.3.2" }}
Then run composer install
.
The "Getting Started" page is the introduction to the documentation. Most documentation will start off with installation instructions, just like Composer's do.
The page that contains information on the composer.json
file is located here - under "Basic Usage", the second page.
I'd recommend reading over the documentation in full, so that you gain a better understanding of how to use Composer. I'd also recommend removing what you have and following the installation instructions provided in the documentation.