Yii2 凉亭错误 heroku
Yii2 bower error heroku
我正在使用 php yii2 框架,当我想安装一个组件时,出现以下错误:
composer require codemix / yii2-excelexport
错误:
Using version ^ 2.7 for codemix / yii2-excelexport
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "https://bower.herokuapp.com/packages/jquery" file could not be downloaded (HTTP / 1.1 502 Bad Gateway)
https://bower.herokuapp.com/packages could not be fully loaded, package information was loaded from the local cache and may be out of date
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: do not install yiisoft / yii2 2.0.15.1
- Conclusion: do not install yiisoft / yii2 2.0.15
- Conclusion: do not install yiisoft / yii2 2.0.14.2
- Conclusion: do not install yiisoft / yii2 2.0.14.1
- Conclusion: do not install yiisoft / yii2 2.0.14
- Conclusion: do not install yiisoft / yii2 2.0.13.3
- Conclusion: do not install yiisoft / yii2 2.0.13.2
- Installation request for yiisoft / yii2 (locked at 2.0.12, required as ~ 2.0.5) -> satisfiable by yiisoft / yii2 [2.0.12].
- Conclusion: do not install yiisoft / yii2 2.0.13.1
- yii2tech / spreadsheet 1.0.0 requires yiisoft / yii2 ~ 2.0.13 -> satisfiable by yiisoft / yii2 [2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2 , 2.0.15, 2.0.15.1].
- yii2tech / spreadsheet 1.0.1 requires yiisoft / yii2 ~ 2.0.13 -> satisfiable by yiisoft / yii2 [2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2 , 2.0.15, 2.0.15.1].
- yii2tech / spreadsheet 1.0.2 requires yiisoft / yii2 ~ 2.0.13 -> satisfiable by yiisoft / yii2 [2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2 , 2.0.15, 2.0.15.1].
- Conclusion: do not install yiisoft / yii2 2.0.13
- Installation request for yii2tech / spreadsheet ^ 1.0 -> satisfiable by yii2tech / spreadsheet [1.0.0, 1.0.1, 1.0.2].
Installation failed, reverting ./composer.json to its original content.
我了解到您必须在 .bowerrc 文件中添加以下行
{
"directory": "vendor / bower",
"timeout": 120000,
"registry": {
"search": [
"http: // localhost: 8000",
"https://registry.bower.io"
]
}
}
composer.json
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Project Template",
"keywords": ["yii2", "framework", "basic", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.5",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"kartik-v/yii2-widget-select2": "@dev",
"sammaye/yii2-audittrail": "^1.2",
"kartik-v/yii2-export": "@dev",
"ruskid/yii2-csv-importer": "dev-master",
"moonlandsoft/yii2-phpexcel": "*",
"wbraganca/yii2-dynamicform": "dev-master",
"rmrevin/yii2-fontawesome": "~2.17",
"yiisoft/yii2-jui": "^2.0@dev",
"kartik-v/yii2-mpdf": "*",
"kalyabin/yii2-select-google-map-location": "*",
"kartik-v/yii2-widget-datetimepicker": "*"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/base": "^2.2.3",
"codeception/verify": "~0.3.1",
"codeception/specify": "~0.4.3"
},
"config": {
"process-timeout": 1800,
"fxp-asset":{
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
},
"scripts": {
"post-create-project-cmd": [
"yii\composer\Installer::postCreateProject"
]
},
"extra": {
"yii\composer\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
],
"generateCookieValidationKey": [
"config/web.php"
]
}
}
}
我做了,但是没有解决问题。有人可以帮助我吗?
您需要更多信息来帮助我检测问题吗?
codemix/yii2-excelexport
需要比您安装的版本更新的 Yii 版本。您需要 运行 require
和 --update-with-all-dependencies
开关:
composer require codemix/yii2-excelexport --update-with-all-dependencies
bower 警告可能与安装失败无关。但是您应该将 fxp/composer-asset-plugin
更新到最新版本以消除此警告:
composer global require "fxp/composer-asset-plugin:~1.4.4"
我正在使用 php yii2 框架,当我想安装一个组件时,出现以下错误:
composer require codemix / yii2-excelexport
错误:
Using version ^ 2.7 for codemix / yii2-excelexport
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "https://bower.herokuapp.com/packages/jquery" file could not be downloaded (HTTP / 1.1 502 Bad Gateway)
https://bower.herokuapp.com/packages could not be fully loaded, package information was loaded from the local cache and may be out of date
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: do not install yiisoft / yii2 2.0.15.1
- Conclusion: do not install yiisoft / yii2 2.0.15
- Conclusion: do not install yiisoft / yii2 2.0.14.2
- Conclusion: do not install yiisoft / yii2 2.0.14.1
- Conclusion: do not install yiisoft / yii2 2.0.14
- Conclusion: do not install yiisoft / yii2 2.0.13.3
- Conclusion: do not install yiisoft / yii2 2.0.13.2
- Installation request for yiisoft / yii2 (locked at 2.0.12, required as ~ 2.0.5) -> satisfiable by yiisoft / yii2 [2.0.12].
- Conclusion: do not install yiisoft / yii2 2.0.13.1
- yii2tech / spreadsheet 1.0.0 requires yiisoft / yii2 ~ 2.0.13 -> satisfiable by yiisoft / yii2 [2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2 , 2.0.15, 2.0.15.1].
- yii2tech / spreadsheet 1.0.1 requires yiisoft / yii2 ~ 2.0.13 -> satisfiable by yiisoft / yii2 [2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2 , 2.0.15, 2.0.15.1].
- yii2tech / spreadsheet 1.0.2 requires yiisoft / yii2 ~ 2.0.13 -> satisfiable by yiisoft / yii2 [2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2 , 2.0.15, 2.0.15.1].
- Conclusion: do not install yiisoft / yii2 2.0.13
- Installation request for yii2tech / spreadsheet ^ 1.0 -> satisfiable by yii2tech / spreadsheet [1.0.0, 1.0.1, 1.0.2].
Installation failed, reverting ./composer.json to its original content.
我了解到您必须在 .bowerrc 文件中添加以下行
{
"directory": "vendor / bower",
"timeout": 120000,
"registry": {
"search": [
"http: // localhost: 8000",
"https://registry.bower.io"
]
}
}
composer.json
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Project Template",
"keywords": ["yii2", "framework", "basic", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.5",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"kartik-v/yii2-widget-select2": "@dev",
"sammaye/yii2-audittrail": "^1.2",
"kartik-v/yii2-export": "@dev",
"ruskid/yii2-csv-importer": "dev-master",
"moonlandsoft/yii2-phpexcel": "*",
"wbraganca/yii2-dynamicform": "dev-master",
"rmrevin/yii2-fontawesome": "~2.17",
"yiisoft/yii2-jui": "^2.0@dev",
"kartik-v/yii2-mpdf": "*",
"kalyabin/yii2-select-google-map-location": "*",
"kartik-v/yii2-widget-datetimepicker": "*"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/base": "^2.2.3",
"codeception/verify": "~0.3.1",
"codeception/specify": "~0.4.3"
},
"config": {
"process-timeout": 1800,
"fxp-asset":{
"installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
},
"scripts": {
"post-create-project-cmd": [
"yii\composer\Installer::postCreateProject"
]
},
"extra": {
"yii\composer\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
],
"generateCookieValidationKey": [
"config/web.php"
]
}
}
}
我做了,但是没有解决问题。有人可以帮助我吗?
您需要更多信息来帮助我检测问题吗?
codemix/yii2-excelexport
需要比您安装的版本更新的 Yii 版本。您需要 运行 require
和 --update-with-all-dependencies
开关:
composer require codemix/yii2-excelexport --update-with-all-dependencies
bower 警告可能与安装失败无关。但是您应该将 fxp/composer-asset-plugin
更新到最新版本以消除此警告:
composer global require "fxp/composer-asset-plugin:~1.4.4"