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