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

Saturday, January 1, 2022

[FIXED] Composer could not find the config file: C:\Users\Username\AppData\Roaming\Composer\vendor\bin

 January 01, 2022     composer-php, git-bash, laravel     No comments   

Issue

I cannot seem to install Laravel using the following command: composer create-project laravel/laravel laravel-testing --prefer-dist as it keeps throwing the following error:

 [InvalidArgumentException]
 Composer could not find the config file: C:\Users\Kieran\AppData\Roaming\Co
 mposer\vendor\bin
 To initialize a project, please create a composer.json file as described in
  the http://getcomposer.org/ "Getting Started" section

enter image description here

The vendor and bin folders did not exist in the below path, so I created the folders vendor and then bin inside that but still no luck:

C:\Users\Kieran\AppData\Roaming\Composer\vendor\bin

What am I doing wrong?


Solution

I managed to fix this problem. I had to delete the composerenvironment variable. Which can be found here: Control Panel>System>Edit the system environment variables>Environment variables>composer>delete

After I deleted this I could run the command I wanted with out any errors and it worked as expected: composer create-project laravel/laravel laravel-testing --prefer-dist



Answered By - ifusion
  • 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