yii2项目中运行composer 过程中遇到的问题

1.出现问题如下:

Your requirements could not be resolved to an installable set of packages

则表明 未安装fxp/composer-asset-plugin ;

解决方法:控制台执行

composer global require "fxp/composer-asset-plugin:~1.0.0"

2.出现问题如下:

Could not fetch xxxx, please create a GitHub OAuth tokento go over the API rate limit

Head to https://github.com/xxxxto retrieve a token. It will be stored in "C:/Users/xxx/AppData/Roaming/Composer/auth.json" for future use by Composer.

Token (hidden):

则表示需要你用github账号登陆后获取关键码 
解决方法: 
1.注册一个github账号,有更好,登陆后 
2.打开 https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+localhost.localdomain+2015-11-30+1600 
3.单击绿色的按钮:Generate token,复制关键码,粘贴在Token(hidden)后 ,粘贴后token不会显示出来,直接按回车尝试是否成功
4.出现Token stored successfully.则成功,如果失败,看看改时间再生成一次,试试 

猜你喜欢

转载自www.cnblogs.com/-mrl/p/9019537.html