[Invalid Argument Exception] and Fatal Error
I just downloaded and installed Laragon and i proceeded to create a Laravel project.
First problem i notices was the [InvalidArgumentException] on the Terminal. It reads:
Composer could not find the config file: c:\composer
To Initialize a project, please create a composer.json file as described in the https://getcomposer.org/ 'Getting Started' section "
After the project was created i tried the url(PorjectName.dev) on the browser and got a Warning and a Fatal error:
*Warning: require(C:\laragon\www\PorjectName\public/../vendor/autoload.php): failed to open stream: No such file or directory in C:\laragon\www\ProjectName\public\index.php on line 24
Fatal error: require(): Failed opening required 'C:\laragon\www\ProjectName\public/../vendor/autoload.php' (include_path='.;C:/laragon/etc/php/pear') in C:\laragon\www\ProjectName\public\index.php on line 24.*
I can not even find the vendor folder anywhere in my project or the installation.
I have read about some solutions but they seem to be for the regular installation of Laravel using composer. I am new to using these tool and need help please.
What did you do to create the Laravel project (Menu > Quick Create)?
Yes, i used (Menu>Quick Create>Laravel). I also tried creating project from the CLI using:
composer create-project laravel/laravel ProjectName --prefer-dist
c:\composer...Had you installed
If you provide some images, it would be helpful.
I have installed composer before but i deleted it afterward and i also uninstalled Laragon so i could start afresh so as to eliminate any possible conflicts.
If you still see
C:\composer, it means you did not completely uninstalling
And composer is not listed in my installed program list in control panel. I manually deleted the composer folder in my c-drive
@Tochukz : If you deleted it manually, you should also delete it from PATH. Check you PATH environment variable and remove the
@leokhoa: I have now removed c:\composer from my Path environment variable. But before then i just tried to create another project and i see that the packages were being downloaded on the CLI. I don't really know what the problem had been but now it has been successfully installed. Thanks.
I wish i know what happened.
@Tochukz : You manually deleted composer which caused conflicts and things worked unstable. I glad to hear it fixed Cheers!