欢迎光临
我们一直在努力

composer的bower-asset设置

1、bower-asset引用问题

"require": {
"php": ">=5.4.0",
"yiisoft/yii2": ">=2.0.6",
"bower-asset/dp-extjs": "~1.0",
"bower-asset/dp-extjs-extend": "~1.0"
},

对于出现bower-asset的,需要在使用前bower-asset,可以去   http://bower.io/search/   搜索 dp-extjs,不过,在使用之前,需要先

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

先加载这个,才能使用bower-asset,在github上面的项目,如果提交到bower.io就可以用bower-asset的方式加载。

2、安装过程遇到如下情况:

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

Problem 1

- yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- Installation request for yiisoft/yii2 >=2.0.5 -> satisfiable by yiisoft/yii2[2.0.5, 2.0.6, 2.0.7, 2.0.8].

Potential causes:

- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

网上很多指导方案都是按照yii 官方的

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

来选择加载插件,但是依然不能通过,不清楚,是不是mac的原因,插件版本难道不对,在更换了多次,清除缓存、删除路径下代码等工作之后,我在“1.0.0”的位置,尝试了1.1.1。结果证实,是可以的。

未经允许不得转载:发现未来 » composer的bower-asset设置

分享到:更多 ()

评论 抢沙发

评论前必须登录!

 

发现网服务 更专业 更方便

广告联系联系我们