Heroku deploy failed: [remote rejected] master -gt; master (pre-receive hook declined): error: failed to push some refs(Heroku 部署失败:[remote denied] master -master (pre-receive hook denied): error: failed to push some refs)
问题描述
我将现有应用程序复制到新存储库中.它在本地工作.为原件部署工作.我正在使用 PHP、Yii 和 Composer.我不知道 fxp/composer-asset-plugin
是什么.
I copied an existing app into a new repository. It works locally. Deploys work for the original. I'm using PHP, Yii, and Composer. I don't know what fxp/composer-asset-plugin
is.
C:UsersChloeworkspaceaffiliorama>git push heroku master
Counting objects: 699, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (655/655), done.
Writing objects: 100% (699/699), 25.36 MiB | 142.00 KiB/s, done.
Total 699 (delta 146), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote: - php (5.6.20)
remote: - ext-gd (bundled with php)
remote: - ext-mbstring (bundled with php)
remote: - ext-soap (bundled with php)
remote: - nginx (1.8.1)
remote: - apache (2.4.20)
remote: -----> Installing dependencies...
remote: Composer version 1.0.0 2016-04-05 13:27:25
remote: Loading composer repositories with package information
remote: Installing dependencies from lock file
remote: - Installing fxp/composer-asset-plugin (v1.1.2)
remote: Downloading: 100%
remote:
remote: Plugin installation failed, rolling back
remote: - Removing fxp/composer-asset-plugin (v1.1.2)
remote:
remote:
remote: [ReflectionException]
remote: Class FxpComposerAssetPluginRepositoryNpmRepository does not exist
remote:
remote:
remote: [ErrorException]
remote: Declaration of FxpComposerAssetPluginRepositoryAbstractAssetsRepository::whatProvides() should be compatible with ComposerRepositoryComposerRepository::whatProvides(ComposerDependencyResolverPool $pool, $name, $bypassFilters = false)
remote:
remote:
remote: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
remote:
remote:
remote: ! Push rejected, failed to compile PHP app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to affiliorama.
remote:
To https://git.heroku.com/affiliorama.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/affiliorama.git'
如果重要的话,这在我的 composer.json
中
This is in my composer.json
if it's important
"require": {
"fxp/composer-asset-plugin": "^1.0",
推荐答案
我不得不跑
composer global require fxp/composer-asset-plugin --no-plugins
然后 composer 更新
,然后提交,然后推送.它通过了那部分.
then composer update
, then commit, then push. It got past that part.
remote: - Installing fxp/composer-asset-plugin (v1.1.3)
remote: Downloading: 100%
<小时>
它又坏了,我不得不删除 vendor/
和 composer.lock
.您可以使用 composer global remove "fxp/composer-asset-plugin"
删除全局插件.也有人说你可以使用rm -r ~/.composer
.在此期间它给出了一个不同的错误.出于某种原因,即使您在 composer.json
require 部分中有 "fxp/composer-asset-plugin": "*",
>,它只是不加载它.所以我不得不再次运行global require"来全局安装那个神秘的包,然后我可以运行 composer install
来让一切都变得新鲜,它工作了.
It broke again and I had to delete vendor/
and composer.lock
. You can remove the global plugin with composer global remove "fxp/composer-asset-plugin"
. Someone also said you can use rm -r ~/.composer
. It was giving a different error in the interim. For some reason, even if you have "fxp/composer-asset-plugin": "*",
in your require
section of composer.json
, it just doesn't load it. So I had to run 'global require' again to install that mystery package globally, and then I could run composer install
to get everything fresh, and it worked.
这篇关于Heroku 部署失败:[remote denied] master ->master (pre-receive hook denied): error: failed to push some refs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Heroku 部署失败:[remote denied] master ->master (pre-receive hook denied): error: failed to push some refs
基础教程推荐
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01