我将现有应用复制到新存储库中。它在本地工作。部署原始工作。我正在使用PHP,Yii和Composer。我不知道fxp/composer-asset-plugin
是什么。
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'
这是我的composer.json
,如果它很重要
"require": {
"fxp/composer-asset-plugin": "^1.0",
答案 0 :(得分:4)
我必须跑
composer global require fxp/composer-asset-plugin --no-plugins
然后composer update
,然后提交,然后推送。它超越了那一部分。
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
。它在过渡期间给出了不同的错误。出于某种原因,即使您"fxp/composer-asset-plugin": "*",
的{{1}}部分中有require
,也只是不加载它。所以我不得不再次运行'global require'来在全局安装这个神秘包,然后我可以运行composer.json
来获取所有新鲜的东西,并且它有效。