我正在通过composer更新我的yii2,然后恢复到旧的测试版。
以下是我的作曲器上的错误:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package bower-asset/jquery could not be found in any version, there may be a typ
o in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setti
ng
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
我尝试在packagist上搜索bower-asset/jquery,但没有找到。
感谢您的帮助:)
发布于 2014-09-17 14:45:50
最后修复了它,只需遵循UPGRADE.md文档中的步骤
如果您正在使用Composer升级Yii,您应该首先运行以下命令(一次性)来安装composer-asset-plugin:
composer global require "fxp/composer-asset-plugin:^1.2.0"
(有关最新版本,请参阅http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-from-composer。)
您可能还需要将以下代码添加到项目的composer.json
文件中:
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
希望这能有所帮助:)
发布于 2015-12-05 08:02:53
对我来说,帮助我删除文件夹~/.composer并执行命令:
php composer.phar global require "fxp/composer-asset-plugin:1.*"
然后再运行一次
php composer.phar update
发布于 2017-11-06 16:51:00
找到了更干净的解决方案。只需在composer.json文件中添加以下存储库
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
观看魔术表演
https://stackoverflow.com/questions/25882271
复制相似问题