最近在學習yii2.0 一直想用官方推薦的composer來安裝 一直不成功 報了一個錯誤一直在困擾著我
廢話少說 直入主題
➜ 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 (1iisoft/yii2-app-advanced (2.0.12): Downloading (1iisoft/yii2-app-advanced (2.0.12): Downloading (1iisoft/yii2-app-advanced (2.0.12): Downloading (100% )
Created project in yii2-advanced
Loading composer repositories with package information
Updating dependencies (including require-dev)
Reception#Reoo
## No valid bower.json was found in any branch or tag 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] [- -] [
composer create-project yiisoft/yii2-app-advanced yii2-advanced --prefer-dist
直接編輯yii2-advanced資料夾
composer.json檔案#vi yii2-advanced/composer.json
將
"config": {"process-timeout": 1800},
"config": {"process-timeout": 1800,"github-oauth": { "github.com": "此处输入您的github授权码" } },
cd yii2-advanced composer update
#點選此連結 --> 點選右上角Generate new token -->在Token description中輸入"yii composer install token"
#--> 點選Generate token即可建立新的github授權碼
Token description中可以隨意輸入描述
#
以上是yii2使用安裝composer出錯問題總結的詳細內容。更多資訊請關注PHP中文網其他相關文章!