PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, March 2, 2022

[FIXED] Composer could not find a composer.json

 March 02, 2022     composer-php, json, osx-mavericks, php     No comments   

Issue

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 josegonzalez/homebrew-php brew install josegonzalez/php/composer

I can run php composer.phar, but when I do php composer.phar install, I get the error:

Composer could not find a composer.json file in /usr/local/bin To initialize a project, please create a composer.json file as described in the http://getcomposer.org/ "Getting Started" section

So I go to the https://getcomposer.org/doc/00-intro.md. CTRL+F ".json" and nothing's there. Seriously composer?

EDIT: What I was trying to do was to have composer executable vs php composer.phar. This works at this point from this now.


Solution

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.



Answered By - user926352
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing