douhan9619 2016-04-17 03:49
浏览 298
已采纳

Heroku部署失败:[远程拒绝]主 - >主(预接收挂钩拒绝):错误:无法推送一些引用

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:\Users\Chloe\workspace\affiliorama>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 Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
remote:
remote:
remote:          [ErrorException]

remote:          Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::whatProvides() should be compatible with Composer\Repository\ComposerRepository::whatProvides(Composer\DependencyResolver\Pool $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'

This is in my composer.json if it's important

"require": {
    "fxp/composer-asset-plugin": "^1.0",
  • 写回答

1条回答 默认 最新

  • douyan8027 2016-04-17 04:18
    关注

    I had to run

    composer global require fxp/composer-asset-plugin --no-plugins
    

    then composer update, then commit, then push. It got past that part.

    remote:          - Installing fxp/composer-asset-plugin (v1.1.3)
    remote:            Downloading: 100%
    

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?
  • ¥50 invest生境质量模块