首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Composer消除了对每个部署的依赖关系。

Composer消除了对每个部署的依赖关系。
EN

Stack Overflow用户
提问于 2015-04-23 18:36:24
回答 2查看 799关注 0票数 2

每次Forge自动部署时,composer都会删除依赖项,为了让我的站点再次运行,我必须从命令行运行composer更新。

Laravel Forge错误:

代码语言:javascript
复制
We were unable to deploy your project to your server

错误输出:

代码语言:javascript
复制
From bitbucket.org:repo/site
 * branch            master     -> FETCH_HEAD
   cc5de65..6c0428c  master     -> origin/master
Updating cc5de65..6c0428c
Fast-forward
 resources/views/home.blade.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Loading composer repositories with package information
Installing dependencies from lock file
  - Removing phpspec/phpspec (2.2.0)
  - Removing phpspec/php-diff (v1.0.2)
  - Removing phpunit/phpunit (4.6.4)
  - Removing phpunit/php-code-coverage (2.0.16)
  - Removing phpunit/php-file-iterator (1.4.0)
  - Removing phpunit/php-token-stream (1.4.1)
  - Removing phpunit/php-timer (1.0.5)
  - Removing phpunit/phpunit-mock-objects (2.3.1)
  - Removing phpunit/php-text-template (1.2.0)
  - Removing phpspec/prophecy (1.4.0)
  - Removing doctrine/instantiator (1.0.4)
  - Removing symfony/yaml (v2.6.6)
  - Removing sebastian/comparator (1.1.1)
  - Removing sebastian/diff (1.3.0)
  - Removing sebastian/environment (1.2.2)
  - Removing sebastian/exporter (1.2.0)
  - Removing sebastian/recursion-context (1.0.0)
  - Removing sebastian/global-state (1.0.0)
  - Removing sebastian/version (1.0.5)
  - Removing laracasts/generators (1.1)
Generating autoload files
PHP Fatal error:  Class 'Laracasts\Generators\GeneratorsServiceProvider' not found in /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 150
PHP Stack trace:
PHP   1. {main}() /home/forge/site/artisan:0
PHP   2. Illuminate\Foundation\Console\Kernel->handle() /home/forge/site/artisan:36
PHP   3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:92
PHP   4. Illuminate\Foundation\Application->bootstrapWith() /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:195
PHP   5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:181
PHP   6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:15
PHP   7. Illuminate\Foundation\ProviderRepository->load() /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:468
PHP   8. Illuminate\Foundation\ProviderRepository->createProvider() /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75



  [Symfony\Component\Debug\Exception\FatalErrorException]           
  Class 'Laracasts\Generators\GeneratorsServiceProvider' not found  

我试图将composer.lock从.gitignore中删除,但是没有什么改变。

为什么会发生这种事??

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2015-04-23 19:53:49

为了使其正常工作,我从以下位置更改了部署脚本:

代码语言:javascript
复制
cd /home/forge/site
git pull origin master
composer install --no-interaction --no-dev --prefer-dist
php artisan migrate --force

至:

代码语言:javascript
复制
cd /home/forge/site
git pull origin master
composer install --no-interaction --prefer-dist
php artisan migrate --force
票数 3
EN

Stack Overflow用户

发布于 2015-04-23 19:00:49

是的,composer.lock无论如何都应该是版本控制的(请看这里)。您确实已经将composer.lock提交到bitbucket存储库了吗?如果不将其添加到提交中,则从.gitignore中删除可能是不够的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29831701

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档