close

[Solved] ‘composer’ is not recognized as an internal or external command, operable program or batch file

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ‘composer’ is not recognized as an internal or external command, operable program or batch file in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ‘composer’ is not recognized as an internal or external command, operable program or batch file Error Occurs?

Today I get the following error ‘composer’ is not recognized as an internal or external command, operable program or batch file in php.

How To Solve ‘composer’ is not recognized as an internal or external command, operable program or batch file Error ?

  1. How To Solve 'composer' is not recognized as an internal or external command, operable program or batch file Error ?

    To Solve 'composer' is not recognized as an internal or external command, operable program or batch file Error I had the same problem . In my case i used the command “php composer.phar ” instead of “Composer ” and it worked .

  2. 'composer' is not recognized as an internal or external command, operable program or batch file

    To Solve 'composer' is not recognized as an internal or external command, operable program or batch file Error I had the same problem . In my case i used the command “php composer.phar ” instead of “Composer ” and it worked .

Solution 1

I had the same problem, I kept repeating the composer installation until it was resolved this way:

1) Download the composer installer (.exe) and put it on C:/XAMPP.

2) Run the installer by just clicking next till the end.

3) Open command-line (cmd) and cd to your project directory (C:/XAMPP/htdocs/myproject) and type composer and see if you have it installed.

4) It should work now, let’s say you want to install a PHP framework from your project directory: cmd=>composer require slim/slim "^3.0".

Solution 2

I had the same problem . In my case i used the command “php composer.phar ” instead of “Composer ” and it worked .

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment