[Invalid Argument Exception] and Fatal Error


  • | 475 points

    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:
    "[InavlidArgumentException]
    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.


  • administrators
    | 62340 points

    @Tochukz :
    What did you do to create the Laravel project (Menu > Quick Create)?


  • | 475 points

    Yes, i used (Menu>Quick Create>Laravel). I also tried creating project from the CLI using:
    composer create-project laravel/laravel ProjectName --prefer-dist


  • administrators
    | 62340 points

    Why c:\composer...Had you installed composer before?
    If you provide some images, it would be helpful.


  • | 475 points

    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.


  • administrators
    | 62340 points

    If you still see C:\composer, it means you did not completely uninstalling composer


  • | 475 points

    And composer is not listed in my installed program list in control panel. I manually deleted the composer folder in my c-drive


  • administrators
    | 62340 points

    @Tochukz : If you deleted it manually, you should also delete it from PATH. Check you PATH environment variable and remove the C:\composer entry


  • | 475 points

    @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.


  • administrators
    | 62340 points

    @Tochukz : You manually deleted composer which caused conflicts and things worked unstable. I glad to hear it fixed :) Cheers!


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.