Yii2 use of installation composer Error summary

Source: Internet
Author: User
Tags composer install
recently in the study yii2.0 always wanted to use the official recommended composer to install has been unsuccessful reported a mistake has been bothering me

Talk less straight into the topic

Errors reported by the terminal:

➜yii2.0 composer Create-project yiisoft/yii2-app-advanced yii2-advanced--prefer-dist
Installing yiisoft/yii2-app-advanced (2.0.12)
-Installing yiisoft/yii2-app-advanced (2.0.12): Downloading (100%)
Created Project in yii2-advanced
Loading Composer repositories with the package information
Updating dependencies (including Require-dev)


[Composer\repository\invalidrepositoryexception]
No valid Bower.json was found in any branch or tagged of, could not load a package from it.

Create-project [-s|--stability stability] [--prefer-source] [--prefer-dist] [--repository repository] [-- Repository-url Repository-url] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [-- No-secure-http] [--keep-vcs] [--no-install] [--IGNORE-PLATFORM-REQS] [--] [<package>] [<directory>] [< Version>]

Problem Description:

In the terminal input

Composer Create-project yiisoft/yii2-app-advanced yii2-advanced--prefer-dist

Then there was this error ....

Workaround:

Now I find that the solution to this problem is:

Edit yii2-advanced folder composer.json file directly

VI Yii2-advanced/composer.json

Then add the license for GitHub

Will

"Config": {"process-timeout": 1800},

Switch

"Config": {"process-timeout": 1800, "Github-oauth": {          "github.com": "Enter your GitHub Authorization Code"  }    },

Save the file and run the following command to complete the import of the YII2 framework

CD Yii2-advancedcomposer Update

How do I get a github authorization code??

Click this link-click Generate new token in the upper right corner and enter "Yii composer install token" in token description

--click Generate token to create a new GitHub authorization code

You can enter a description in Token description

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.