Composer could not find a composer.json

后端 未结 11 762
南方客
南方客 2020-12-29 07:52

I tried to install composer via brew per:

In usr/local/bin (which was not on Mavricks and I had to make personally) I did.

brew tap jose

相关标签:
11条回答
  • 2020-12-29 08:25

    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.

    0 讨论(0)
  • 2020-12-29 08:25

    In my case I'm in wrong directory,

    My directory Path
    eCommerce-shop/eCommerce
    

    I am in inside eCommerce-shop and executing this command composer intsall so that't it throwing this error.

    0 讨论(0)
  • 2020-12-29 08:29

    In my case, I am using homestead.
    cd ~/Homesteadand run composer install.

    0 讨论(0)
  • 2020-12-29 08:31

    To install composer and add to your global path:

    curl -sS https://getcomposer.org/installer | php
    mv 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

    0 讨论(0)
  • 2020-12-29 08:32

    Simple solution is install via this command :

    curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
    

    To install package it's very simple :

     composer global require "phpunit/php-invoker=1.1.*"
    

    Ref : composer web site.

    0 讨论(0)
提交回复
热议问题