Create Laravel project using Composer: Composer could not find the config file?

Source: Internet
Author: User
Following the documentation,

1. Install composer First and then download the Laravel installation package:
composer global require "laravel/installer=~1.1"
Command execution succeeded.

2. Add the directory ~/.composer/vendor/bin to the system environment variable.
3. Run the laravel New Test command to create the Laravel project with the following error:

E:\>laravel new testCrafting application...Composer could not find the config file: C:\Users\yanwushu\vendor\binTo initialize a project, please create a composer.json file as described in thehttps://getcomposer.org/ "Getting Started" sectionApplication ready! Build something amazing.

Individuals have no clear understanding of composer and laravel, please be familiar with the comrades to give advice.

Reply content:

Following the documentation,

1. Install composer First and then download the Laravel installation package:
composer global require "laravel/installer=~1.1"
Command execution succeeded.

2. Add the directory ~/.composer/vendor/bin to the system environment variable.
3. Run the laravel New Test command to create the Laravel project with the following error:

E:\>laravel new testCrafting application...Composer could not find the config file: C:\Users\yanwushu\vendor\binTo initialize a project, please create a composer.json file as described in thehttps://getcomposer.org/ "Getting Started" sectionApplication ready! Build something amazing.

Individuals have no clear understanding of composer and laravel, please be familiar with the comrades to give advice.

Execute at the command line

composer config -l -g

In the result of the output, where the "home" configuration item content is the composer home directory, and then enter vendor\bin , the path is added to the environment variable.
As you can see from the error message above, the one you use to initialize the project vendor\bin is C:\Users\yanwushu\vendor\bin that you need to make sure that the path is composer the home directory and that the following vendor\bin exists. It is recommended to execute the method I said above, look at the path, and then add the correct path to the environment variable.

Recommended for 2nd steps under Check

composer selfupdateComposer version low?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.