Use composer to create a laravel project: Composercouldnotfindtheconfigfile?

Source: Internet
Author: User
Follow the instructions in the Document. 1. First install composer and then download the laravel installation package: composerglobalrequire & quot; laravelinstaller ~ 1.1 & quot; Command executed successfully. 2. Change the directory ~. Add composervendorbin to system environment variables. 3. Run laravelnewtest,

1. First install composer and then download the laravel installation package:
composer global require "laravel/installer=~1.1"
The command is successfully executed.

2. Change the directory ~ /. Add composer/vendor/bin to system environment variables.
3. Run the laravel new test command to create the laravel project. The following error is returned:

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.

I personally do not have a clear understanding of composer and laravel. Please give advice to the familiar comrades.

Reply content:

Follow the instructions,

1. First install composer and then download the laravel installation package:
composer global require "laravel/installer=~1.1"
The command is successfully executed.

2. Change the directory ~ /. Add composer/vendor/bin to system environment variables.
3. Run the laravel new test command to create the laravel project. The following error is returned:

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.

I personally do not have a clear understanding of composer and laravel. Please give advice to the familiar comrades.

Run

composer config -l -g

In the output result, the content of the "home" configuration item iscomposerAnd then entervendor\binTo add the path to the environment variable.
From the above error message, we can see thatvendor\binYesC:\Users\yanwushu\vendor\bin, You need to make sure that the path iscomposerAnd the followingvendor\binYes. We recommend that you execute the method I mentioned above, check the path, and add the correct path to the environment variable.

We recommend that you check the next step.

composer selfupdate// Is the composer 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.