无法通过 composer bower-asset/jquery 更新 yii2 找不到 [英] Cannot update yii2 via composer bower-asset/jquery could not be found
问题描述
我正在通过 composer 更新我的 yii2,然后恢复到旧的 beta 版本.
I was updating my yii2 via composer then reverted back to the old beta version.
这是我的作曲家的错误:
Here is the error on my composer:
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,但未找到.
Tried searching for bower-asset/jquery at packagist but it is not found.
感谢您的帮助:)
推荐答案
终于修好了,按照UPGRADE.md文档上的步骤搞定
Finally fixed it, just followed the steps on the UPGRADE.md doc
如果你正在使用 Composer 升级 Yii,你应该先运行以下命令(一次性)安装 composer-asset-plugin:
If you are using Composer to upgrade Yii, you should run the following command first (once for all) to install the 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 获取最新版本.)
(See http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-from-composer for latest version.)
您可能还需要将以下代码添加到项目的 composer.json
文件中:
You may also need to add the following code to your project's composer.json
file :
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
希望这会有所帮助:)
这篇关于无法通过 composer bower-asset/jquery 更新 yii2 找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!