heroku laravel - vite not found - laravel

Any help/guidance thank you in advance.
Today I've set up a Heroku dyno, but can't get the vite command to run.
Laravel 9.29, NodeJS 8.15
Trying to run heroku run npm run dev but returns /tmp/dev-3799b748.sh: 1: vite: not found
I've set the build packs to:
heroku buildpacks
=== manage-demo Buildpack URLs
heroku/nodejs
heroku/php
Also the Config Vars NPM_CONFIG_PRODUCTION = false, YARN_PRODUCTION = false
Commands used to create the Laravel Project:
composer create-project laravel/laravel <myprojectname>
composer require laravel/breeze
php artisan breeze:install react
php artisan migrate
npm install
Deploy Branch
-----> Building on the Heroku-22 stack
-----> Using buildpacks:
1. heroku/nodejs
2. heroku/php
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_PRODUCTION=false
NPM_CONFIG_LOGLEVEL=error
USE_NPM_INSTALL=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 16.x...
Downloading and installing node 16.17.0...
Using default npm version: 8.15.0
-----> Restoring cache
- node_modules (not cached - skipping)
-----> Installing dependencies
Installing node modules (package.json + package-lock)
added 165 packages, and audited 166 packages in 3s
25 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
-----> Build
Running build
> build
> vite build
vite v3.1.0 building for production...
transforming...
✓ 254 modules transformed.
rendering chunks...
public/build/manifest.json 3.78 KiB
public/build/assets/ConfirmPassword.6778c5aa.js 1.09 KiB / gzip: 0.61 KiB
public/build/assets/InputLabel.b7560c9a.js 0.20 KiB / gzip: 0.18 KiB
public/build/assets/TextInput.90051331.js 0.63 KiB / gzip: 0.39 KiB
public/build/assets/PrimaryButton.63fa2720.js 0.82 KiB / gzip: 0.49 KiB
public/build/assets/ApplicationLogo.4d214c56.js 3.06 KiB / gzip: 1.30 KiB
public/build/assets/ForgotPassword.863d1afc.js 1.06 KiB / gzip: 0.62 KiB
public/build/assets/Login.ffce380f.js 1.94 KiB / gzip: 0.89 KiB
public/build/assets/Register.13d4ee0d.js 1.95 KiB / gzip: 0.76 KiB
public/build/assets/ResetPassword.467e122e.js 1.57 KiB / gzip: 0.65 KiB
public/build/assets/VerifyEmail.800ac39d.js 1.07 KiB / gzip: 0.61 KiB
public/build/assets/Dashboard.c9f20060.js 17.64 KiB / gzip: 6.24 KiB
public/build/assets/Welcome.875c53e4.js 11.94 KiB / gzip: 3.72 KiB
public/build/assets/app.5c62c80a.css 22.06 KiB / gzip: 4.63 KiB
public/build/assets/app.36a55110.js 315.09 KiB / gzip: 107.01 KiB
-----> Caching build
- node_modules
-----> Pruning devDependencies
Skipping because NPM_CONFIG_PRODUCTION is 'false'
-----> Build succeeded!
-----> PHP app detected
-----> Bootstrapping...
-----> Preparing platform package installation...
-----> Installing platform packages...
- php (8.1.10)
- apache (2.4.54)
- composer (2.4.1)
- nginx (1.22.0)
NOTICE: detected userland polyfill packages for PHP extensions
NOTICE: now attempting to install native extension packages
Installing extensions provided by symfony/polyfill-mbstring:
- ext-mbstring...
Installing extensions provided by symfony/polyfill-ctype:
- ext-ctype...
-----> Installing dependencies...
Composer version 2.4.1 2022-08-20 11:44:50
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 70 installs, 0 updates, 0 removals
- Installing doctrine/inflector (2.0.5): Extracting archive
- Installing doctrine/lexer (1.2.3): Extracting archive
- Installing symfony/polyfill-ctype (v1.26.0): Extracting archive
- Installing webmozart/assert (1.11.0): Extracting archive
- Installing dragonmantank/cron-expression (v3.3.2): Extracting archive
- Installing symfony/polyfill-mbstring (v1.26.0): Extracting archive
- Installing symfony/deprecation-contracts (v3.1.1): Extracting archive
- Installing symfony/http-foundation (v6.1.4): Extracting archive
- Installing fruitcake/php-cors (v1.2.0): Extracting archive
- Installing psr/http-message (1.0.1): Extracting archive
- Installing psr/http-client (1.0.1): Extracting archive
- Installing ralouphie/getallheaders (3.0.3): Extracting archive
- Installing psr/http-factory (1.0.1): Extracting archive
- Installing guzzlehttp/psr7 (2.4.1): Extracting archive
- Installing guzzlehttp/promises (1.5.2): Extracting archive
- Installing guzzlehttp/guzzle (7.5.0): Extracting archive
- Installing voku/portable-ascii (2.0.1): Extracting archive
- Installing symfony/polyfill-php80 (v1.26.0): Extracting archive
- Installing phpoption/phpoption (1.9.0): Extracting archive
- Installing graham-campbell/result-type (v1.1.0): Extracting archive
- Installing vlucas/phpdotenv (v5.4.1): Extracting archive
- Installing symfony/css-selector (v6.1.3): Extracting archive
- Installing tijsverkoyen/css-to-inline-styles (2.2.4): Extracting archive
- Installing symfony/var-dumper (v6.1.3): Extracting archive
- Installing symfony/routing (v6.1.3): Extracting archive
- Installing symfony/process (v6.1.3): Extracting archive
- Installing symfony/polyfill-php72 (v1.26.0): Extracting archive
- Installing symfony/polyfill-intl-normalizer (v1.26.0): Extracting archive
- Installing symfony/polyfill-intl-idn (v1.26.0): Extracting archive
- Installing symfony/mime (v6.1.4): Extracting archive
- Installing psr/container (2.0.2): Extracting archive
- Installing symfony/service-contracts (v3.1.1): Extracting archive
- Installing psr/event-dispatcher (1.0.0): Extracting archive
- Installing symfony/event-dispatcher-contracts (v3.1.1): Extracting archive
- Installing symfony/event-dispatcher (v6.1.0): Extracting archive
- Installing psr/log (3.0.0): Extracting archive
- Installing egulias/email-validator (3.2.1): Extracting archive
- Installing symfony/mailer (v6.1.4): Extracting archive
- Installing symfony/error-handler (v6.1.3): Extracting archive
- Installing symfony/http-kernel (v6.1.4): Extracting archive
- Installing symfony/finder (v6.1.3): Extracting archive
- Installing symfony/polyfill-intl-grapheme (v1.26.0): Extracting archive
- Installing symfony/string (v6.1.4): Extracting archive
- Installing symfony/console (v6.1.4): Extracting archive
- Installing symfony/polyfill-php81 (v1.26.0): Extracting archive
- Installing ramsey/collection (1.2.2): Extracting archive
- Installing brick/math (0.10.2): Extracting archive
- Installing ramsey/uuid (4.4.0): Extracting archive
- Installing psr/simple-cache (3.0.0): Extracting archive
- Installing nunomaduro/termwind (v1.14.0): Extracting archive
- Installing symfony/translation-contracts (v3.1.1): Extracting archive
- Installing symfony/translation (v6.1.4): Extracting archive
- Installing nesbot/carbon (2.62.1): Extracting archive
- Installing monolog/monolog (2.8.0): Extracting archive
- Installing league/mime-type-detection (1.11.0): Extracting archive
- Installing league/flysystem (3.3.0): Extracting archive
- Installing nette/utils (v3.2.7): Extracting archive
- Installing nette/schema (v1.2.2): Extracting archive
- Installing dflydev/dot-access-data (v3.0.1): Extracting archive
- Installing league/config (v1.1.1): Extracting archive
- Installing league/commonmark (2.3.5): Extracting archive
- Installing laravel/serializable-closure (v1.2.2): Extracting archive
- Installing laravel/framework (v9.29.0): Extracting archive
- Installing inertiajs/inertia-laravel (v0.6.3): Extracting archive
- Installing laravel/breeze (v1.13.0): Extracting archive
- Installing laravel/sanctum (v2.15.1): Extracting archive
- Installing nikic/php-parser (v4.15.1): Extracting archive
- Installing psy/psysh (v0.11.8): Extracting archive
- Installing laravel/tinker (v2.7.2): Extracting archive
- Installing tightenco/ziggy (v1.4.6): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover --ansi
INFO Discovering packages.
inertiajs/inertia-laravel ............................................. DONE
laravel/breeze ........................................................ DONE
laravel/sanctum ....................................................... DONE
laravel/tinker ........................................................ DONE
nesbot/carbon ......................................................... DONE
nunomaduro/termwind ................................................... DONE
tightenco/ziggy ....................................................... DONE
49 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
-----> Preparing runtime environment...
-----> Checking for additional extensions to install...
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 66M
-----> Launching...
Released v29
https://manage-demo.herokuapp.com/ deployed to Heroku
Starting November 28th, 2022, free Heroku Dynos, free Heroku Postgres, and free Heroku Data for Redis® will no longer be available.
If you have apps using any of these resources, you must upgrade to paid plans by this date to ensure your apps continue to run and to retain your data. For students, we will announce a new program by the end of September. Learn more at https://blog.heroku.com/next-chapter
heroku run npm run dev
npm WARN config production Use `--omit=dev` instead.
> dev
> vite
VITE v3.1.0 ready in 507 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
[..................] | : timing config:load:flatten Completed in 2ms
LARAVEL v9.29.0 plugin v0.6.0
➜ APP_URL: https://manage-demo.herokuapp.com/
node:internal/errors:477 timing config:load:flatten Completed in 2ms
ErrorCaptureStackTrace(err);
^
Error: ENOSPC: System limit for number of file watchers reached, watch '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2301:34)
at createFsWatchInstance (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49738:17)
at setFsWatchListener (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49785:15)
at NodeFsHandler$1._watchWithNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:49940:14)
at NodeFsHandler$1._handleFile (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50004:23)
at NodeFsHandler$1._addToNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50246:21)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:51434:10)
at NodeFsHandler$1._addToNodeFs (file:///app/node_modules/vite/dist/node/chunks/dep-665b0112.js:50254:18) {
errno: -28,
syscall: 'watch',
code: 'ENOSPC',
path: '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h',
filename: '/app/.heroku/node/include/node/openssl/archs/linux-x86_64/asm/include/progs.h'
}

Related

Composer won't finish installing Laravel

So I got my computer back from maintenance, and had to format it. Now I'm trying to re-install everything I had but I'm having trouble installing Laravel. I'm running on a Linux Mint 19.3 OS. I already have PHP installed with all laravel dependecies installed. I installed Composer and when I try to run
composer global require "laravel/installer"
I get this:
Changed current directory to /home/gustavo/.config/composer
Using version ^4.0 for laravel/installer
./composer.json has been updated
Running composer update laravel/installer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 12 installs, 0 updates, 0 removals
- Locking laravel/installer (v4.0.5)
- Locking psr/container (1.0.0)
- Locking symfony/console (v5.1.8)
- Locking symfony/polyfill-ctype (v1.20.0)
- Locking symfony/polyfill-intl-grapheme (v1.20.0)
- Locking symfony/polyfill-intl-normalizer (v1.20.0)
- Locking symfony/polyfill-mbstring (v1.20.0)
- Locking symfony/polyfill-php73 (v1.20.0)
- Locking symfony/polyfill-php80 (v1.20.0)
- Locking symfony/process (v5.1.8)
- Locking symfony/service-contracts (v2.2.0)
- Locking symfony/string (v5.1.8)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 12 installs, 0 updates, 0 removals
- Installing symfony/polyfill-php80 (v1.20.0): Extracting archive
- Installing symfony/process (v5.1.8): Extracting archive
- Installing symfony/polyfill-mbstring (v1.20.0): Extracting archive
- Installing symfony/polyfill-intl-normalizer (v1.20.0): Extracting archive
- Installing symfony/polyfill-intl-grapheme (v1.20.0): Extracting archive
- Installing symfony/polyfill-ctype (v1.20.0): Extracting archive
- Installing symfony/string (v5.1.8): Extracting archive
- Installing psr/container (1.0.0): Extracting archive
- Installing symfony/service-contracts (v2.2.0): Extracting archive
- Installing symfony/polyfill-php73 (v1.20.0): Extracting archive
- Installing symfony/console (v5.1.8): Extracting archive
- Installing laravel/installer (v4.0.5): Extracting archive
6 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
10 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
I remember that usually the laravel installation end with "Build something amazing!" but I didn't get that phrase this time. And now, if try
Laravel new
It says Command not found. As if Laravel was never installed. What am I doing wrong?
You need to set your path variable. I don't know how to do it in linux since I'm a windows user but, you can easily find it on Laravel's official documentation. If you're still having some trouble setting the $PATH variable you can see this answer or maybe read about it from the scratch here.
You can also create a new project like this without setting a path variable:
// From the official documentation...
composer create-project --prefer-dist laravel/laravel blog
On most linux distros you need to add ~/.composer/vendor/bin to the $PATH environment variable.
If you are using bash, you can add it to ~/.bashrc with this line
export PATH=$PATH:~/.composer/vendor/bin

Error trying to connect symfony 5 app with redis on heroku

I am facing an issue when trying to connect a symfony 5 application with a redis server on heroku.
- My composer.json and composer.lock have the ext-redis:"*" setted.
"require": {
"php": "~7.4.0",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-intl": "*",
"ext-openssl": "*",
"ext-redis": "*",
...
}
I have 3 config vars on heroku:
Default var created after heroku redis module activation
REDIS_URL = redis://h:someHash#ec2.eu-west-1.compute.amazonaws.com:27269
Custom var to fit php class Redis constructor
REDIS_HOST = redis://h:someHash#ec2.eu-west-1.compute.amazonaws.com
REDIS_PORT = 27269
My deploy stops on the error: Unable to find the socket transport "redis" - did you forget to enable it when you configured PHP?
The deploy full logs:
-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
- php (7.4.6)
- ext-intl (bundled with php)
- ext-redis (5.2.2)
- apache (2.4.43)
- nginx (1.18.0)
-----> Installing dependencies...
Composer version 1.10.6 2020-05-06 10:28:10
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 108 installs, 0 updates, 0 removals
- Installing ocramius/package-versions (1.8.0): Loading from cache
- Installing symfony/flex (v1.6.3): Loading from cache
- Installing symfony/polyfill-mbstring (v1.17.0): Loading from cache
- Installing mtdowling/jmespath.php (2.5.0): Loading from cache
- Installing ralouphie/getallheaders (3.0.3): Loading from cache
- Installing psr/http-message (1.0.1): Loading from cache
- Installing guzzlehttp/psr7 (1.6.1): Loading from cache
- Installing guzzlehttp/promises (v1.3.1): Loading from cache
- Installing symfony/polyfill-intl-idn (v1.17.0): Loading from cache
- Installing guzzlehttp/guzzle (6.5.3): Loading from cache
- Installing aws/aws-sdk-php (3.138.0): Loading from cache
- Installing doctrine/cache (1.10.0): Loading from cache
- Installing doctrine/collections (1.6.4): Loading from cache
- Installing doctrine/inflector (1.4.1): Loading from cache
- Installing doctrine/instantiator (1.3.0): Loading from cache
- Installing doctrine/lexer (1.2.0): Loading from cache
- Installing psr/container (1.0.0): Loading from cache
- Installing symfony/service-contracts (v2.0.1): Loading from cache
- Installing symfony/stopwatch (v5.0.8): Loading from cache
- Installing symfony/polyfill-php73 (v1.17.0): Loading from cache
- Installing symfony/console (v5.0.8): Loading from cache
- Installing webimpress/safe-writer (2.0.1): Loading from cache
- Installing laminas/laminas-zendframework-bridge (1.0.3): Loading from cache
- Installing laminas/laminas-eventmanager (3.2.1): Loading from cache
- Installing laminas/laminas-code (3.4.1): Loading from cache
- Installing ocramius/proxy-manager (2.8.0): Loading from cache
- Installing doctrine/event-manager (1.1.0): Loading from cache
- Installing doctrine/dbal (2.10.2): Loading from cache
- Installing doctrine/migrations (2.2.1): Loading from cache
- Installing doctrine/annotations (1.10.2): Loading from cache
- Installing doctrine/reflection (1.2.1): Loading from cache
- Installing twig/twig (v3.0.3): Loading from cache
- Installing symfony/translation-contracts (v2.0.1): Loading from cache
- Installing symfony/validator (v5.0.8): Loading from cache
- Installing symfony/twig-bridge (v5.0.8): Loading from cache
- Installing symfony/mime (v5.0.8): Loading from cache
- Installing symfony/http-foundation (v5.0.8): Loading from cache
- Installing psr/event-dispatcher (1.0.0): Loading from cache
- Installing symfony/event-dispatcher-contracts (v2.0.1): Loading from cache
- Installing symfony/event-dispatcher (v5.0.8): Loading from cache
- Installing symfony/var-dumper (v5.0.8): Loading from cache
- Installing psr/log (1.1.3): Loading from cache
- Installing symfony/error-handler (v5.0.8): Loading from cache
- Installing symfony/http-kernel (v5.0.8): Loading from cache
- Installing symfony/filesystem (v5.0.8): Loading from cache
- Installing symfony/config (v5.0.8): Loading from cache
- Installing symfony/twig-bundle (v5.0.8): Loading from cache
- Installing symfony/translation (v5.0.8): Loading from cache
- Installing symfony/security-core (v5.0.8): Loading from cache
- Installing symfony/inflector (v5.0.8): Loading from cache
- Installing symfony/property-access (v5.0.8): Loading from cache
- Installing symfony/security-http (v5.0.8): Loading from cache
- Installing symfony/security-guard (v5.0.8): Loading from cache
- Installing symfony/security-csrf (v5.0.8): Loading from cache
- Installing symfony/dependency-injection (v5.0.8): Loading from cache
- Installing symfony/security-bundle (v5.0.8): Loading from cache
- Installing symfony/routing (v5.0.8): Loading from cache
- Installing symfony/finder (v5.0.8): Loading from cache
- Installing symfony/var-exporter (v5.0.8): Loading from cache
- Installing psr/cache (1.0.1): Loading from cache
- Installing symfony/cache-contracts (v2.0.1): Loading from cache
- Installing symfony/cache (v5.0.8): Loading from cache
- Installing symfony/framework-bundle (v5.0.8): Loading from cache
- Installing symfony/options-resolver (v5.0.8): Loading from cache
- Installing symfony/intl (v5.0.8): Loading from cache
- Installing symfony/polyfill-intl-icu (v1.17.0): Loading from cache
- Installing symfony/form (v5.0.8): Loading from cache
- Installing symfony/expression-language (v5.0.8): Loading from cache
- Installing doctrine/persistence (1.3.7): Loading from cache
- Installing symfony/doctrine-bridge (v5.0.8): Loading from cache
- Installing symfony/asset (v5.0.8): Loading from cache
- Installing pagerfanta/pagerfanta (v2.1.3): Loading from cache
- Installing doctrine/common (2.12.0): Loading from cache
- Installing doctrine/orm (v2.7.2): Loading from cache
- Installing jdorn/sql-formatter (v1.2.17): Loading from cache
- Installing doctrine/doctrine-bundle (2.0.8): Loading from cache
- Installing easycorp/easyadmin-bundle (v2.3.8): Loading from cache
- Installing behat/transliterator (v1.3.0): Loading from cache
- Installing gedmo/doctrine-extensions (v2.4.41): Loading from cache
- Installing symfony/process (v5.0.8): Loading from cache
- Installing matleo/bank-statement-parser (dev-master 88ebc8e): Loading from cache
- Installing phpdocumentor/reflection-common (2.1.0): Loading from cache
- Installing phpdocumentor/type-resolver (1.1.0): Loading from cache
- Installing sensio/framework-extra-bundle (v5.5.5): Loading from cache
- Installing symfony/dotenv (v5.0.8): Loading from cache
- Installing symfony/http-client-contracts (v2.0.1): Loading from cache
- Installing symfony/http-client (v5.0.8): Loading from cache
- Installing egulias/email-validator (2.1.17): Loading from cache
- Installing symfony/mailer (v5.0.8): Loading from cache
- Installing monolog/monolog (2.0.2): Loading from cache
- Installing symfony/monolog-bridge (v5.0.8): Loading from cache
- Installing symfony/monolog-bundle (v3.5.0): Loading from cache
- Installing symfony/notifier (v5.0.8): Loading from cache
- Installing doctrine/doctrine-migrations-bundle (2.1.2): Loading from cache
- Installing symfony/orm-pack (v1.0.8): Loading from cache
- Installing symfony/serializer (v5.0.8): Loading from cache
- Installing symfony/property-info (v5.0.8): Loading from cache
- Installing webmozart/assert (1.8.0): Loading from cache
- Installing phpdocumentor/reflection-docblock (5.1.0): Loading from cache
- Installing symfony/serializer-pack (v1.0.3): Loading from cache
- Installing symfony/polyfill-intl-normalizer (v1.17.0): Loading from cache
- Installing symfony/polyfill-intl-grapheme (v1.17.0): Loading from cache
- Installing symfony/string (v5.0.8): Loading from cache
- Installing twig/extra-bundle (v3.0.3): Loading from cache
- Installing symfony/twig-pack (v1.0.0): Loading from cache
- Installing psr/link (1.0.0): Loading from cache
- Installing symfony/web-link (v5.0.8): Loading from cache
- Installing symfony/yaml (v5.0.8): Loading from cache
Generating optimized autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
62 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In App_KernelProdContainer.php line 3884:
!!
!! Unable to find the socket transport "redis" - did you forget to enable it w
!! hen you configured PHP?
!!
!!
!!
Script #auto-scripts was called via post-install-cmd
! ERROR: Dependency installation failed!
!
! The 'composer install' process failed with an error. The cause
! may be the download or installation of packages, or a pre- or
! post-install hook (e.g. a 'post-install-cmd' item in 'scripts')
! in your 'composer.json'.
!
! Typical error cases are out-of-date or missing parts of code,
! timeouts when making external connections, or memory limits.
!
! Check the above error output closely to determine the cause of
! the problem, ensure the code you're pushing is functioning
! properly, and that all local changes are committed correctly.
!
! For more information on builds for PHP on Heroku, refer to
! https://devcenter.heroku.com/articles/php-support
! Push rejected, failed to compile PHP app.
! Push failed
Do i miss a extension ?
All you need is to instantiate \Redis object correctly. Based on Redis URL you provided it should be like this (code for phpredis extension):
$redis = new \Redis();
$redis->connect('ec2.eu-west-1.compute.amazonaws.com', 27269);
$redis->auth('someHash');
The tricky part here is that you don't need a username 't' from Redis URL provided by Heroku.

vendor folder is not present in my docker image

I'm trying to build a deployable image of my laravel app into docker.
Here is my dockerfile:
FROM php:7.1.14-fpm
ENV node_version 8.4.0
ENV npm_version 5.7.1
RUN echo "deb http://ftp.de.debian.org/debian stretch main " >> /etc/apt/sources.list \
&& apt-get update -y && apt-get install -y openssl zip unzip git automake \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libmagickwand-dev vim --no-install-recommends \
&& apt-get remove -y libgnutls-deb0-28 \
&& apt-get purge --auto-remove -y g++ \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install pdo pdo_mysql mbstring zip -j$(nproc) iconv mcrypt -j$(nproc) gd
WORKDIR /app
COPY . /app
COPY ./entrypoint.sh /tmp
RUN touch ./resources/assets/less/_main_full/main.less \
&& mv ./.env.local ./.env \
&& mv ./.dockerignore-local ./.dockerignore
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& composer install --no-interaction
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \
&& export NVM_DIR="$HOME/.nvm" \
&& [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" \
&& nvm install ${node_version} \
&& npm install -g npm#${npm_version} \
&& npm install \
&& npm run dev
RUN chown -R www-data:www-data \
/app/storage \
/app/bootstrap/cache \
&& chmod 755 /tmp/entrypoint.sh
CMD ["/tmp/entrypoint.sh"]
In the build logs, I can see composer is invoked and working well.
---> Running in c4eb03cbb690
All settings correct for using Composer
Downloading...
Composer (version 1.6.3) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 121 installs, 0 updates, 0 removals
- Installing symfony/finder (v3.4.4): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.7.0): Downloading (100%)
- Installing symfony/var-dumper (v3.4.4): Downloading (100%)
- Installing psr/log (1.0.2): Downloading (100%)
- Installing maximebf/debugbar (1.13.1): Downloading (100%)
- Installing vlucas/phpdotenv (v2.4.0): Downloading (100%)
- Installing symfony/css-selector (v3.1.10): Downloading (100%)
- Installing tijsverkoyen/css-to-inline-styles (2.2.1): Downloading (100%)
- Installing symfony/routing (v3.4.4): Downloading (100%)
- Installing symfony/process (v3.4.4): Downloading (100%)
- Installing paragonie/random_compat (v2.0.11): Downloading (100%)
- Installing symfony/polyfill-php70 (v1.7.0): Downloading (100%)
- Installing symfony/http-foundation (v3.4.4): Downloading (100%)
- Installing symfony/event-dispatcher (v4.0.4): Downloading (100%)
- Installing symfony/debug (v3.4.4): Downloading (100%)
- Installing symfony/http-kernel (v3.4.4): Downloading (100%)
- Installing symfony/console (v3.4.4): Downloading (100%)
- Installing doctrine/lexer (v1.0.1): Downloading (100%)
- Installing egulias/email-validator (2.1.3): Downloading (100%)
- Installing swiftmailer/swiftmailer (v6.0.2): Downloading (100%)
- Installing ramsey/uuid (3.7.3): Downloading (100%)
- Installing psr/simple-cache (1.0.0): Downloading (100%)
- Installing psr/container (1.0.0): Downloading (100%)
- Installing symfony/translation (v3.4.4): Downloading (100%)
- Installing nesbot/carbon (1.22.1): Downloading (100%)
- Installing mtdowling/cron-expression (v1.2.1): Downloading (100%)
- Installing monolog/monolog (1.23.0): Downloading (100%)
- Installing league/flysystem (1.0.42): Downloading (100%)
- Installing erusev/parsedown (1.6.4): Downloading (100%)
- Installing doctrine/inflector (v1.3.0): Downloading (100%)
- Installing laravel/framework (v5.5.33): Downloading (100%)
- Installing barryvdh/laravel-debugbar (v2.4.3): Downloading (100%)
- Installing symfony/class-loader (v3.4.4): Downloading (100%)
- Installing barryvdh/reflection-docblock (v2.0.4): Downloading (100%)
- Installing barryvdh/laravel-ide-helper (v2.4.1): Downloading (100%)
- Installing knplabs/knp-snappy (v1.0.4): Downloading (100%)
- Installing barryvdh/laravel-snappy (v0.4.0): Downloading (100%)
- Installing cocur/slugify (v2.5): Downloading (100%)
- Installing cviebrock/eloquent-sluggable (4.2.4): Downloading (100%)
- Installing davejamesmiller/laravel-breadcrumbs (3.0.3): Downloading (100%)
- Installing doctrine/annotations (v1.6.0): Downloading (100%)
- Installing doctrine/cache (v1.7.1): Downloading (100%)
- Installing doctrine/collections (v1.5.0): Downloading (100%)
- Installing doctrine/common (v2.7.3): Downloading (100%)
- Installing doctrine/dbal (v2.5.13): Downloading (100%)
- Installing fzaninotto/faker (v1.7.1): Downloading (100%)
- Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
- Installing psr/http-message (1.0.1): Downloading (100%)
- Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)
- Installing lab404/laravel-impersonate (1.2.2): Downloading (100%)
- Installing zendframework/zend-diactoros (1.7.0): Downloading (100%)
- Installing symfony/psr-http-message-bridge (v1.0.2): Downloading (100%)
- Installing phpseclib/phpseclib (2.0.9): Downloading (100%)
- Installing league/event (2.1.2): Downloading (100%)
- Installing lcobucci/jwt (3.2.2): Downloading (100%)
- Installing defuse/php-encryption (v2.1.0): Downloading (100%)
- Installing league/oauth2-server (6.1.1): Downloading (100%)
- Installing guzzlehttp/guzzle (6.3.0): Downloading (100%)
- Installing firebase/php-jwt (v4.0.0): Downloading (100%)
- Installing laravel/passport (v3.0.2): Downloading (100%)
- Installing league/oauth1-client (1.7.0): Downloading (100%)
- Installing laravel/socialite (v3.0.0): Downloading (100%)
- Installing laravelcollective/html (5.5.x-dev 2f6dc39): Downloading (100%)
- Installing intervention/image (2.4.1): Downloading (100%)
- Installing danielstjules/stringy (2.4.0): Downloading (100%)
- Installing laravolt/avatar (1.8.1): Downloading (100%)
- Installing mtdowling/jmespath.php (2.4.0): Downloading (100%)
- Installing aws/aws-sdk-php (3.52.2): Downloading (100%)
- Installing league/flysystem-aws-s3-v3 (1.0.18): Downloading (100%)
- Installing liopic/korean-romanizer (1.0): Downloading (100%)
- Installing phpoffice/phpexcel (1.8.1): Downloading (100%)
- Installing symfony/polyfill-util (v1.7.0): Downloading (100%)
- Installing symfony/polyfill-php56 (v1.7.0): Downloading (100%)
- Installing nikic/php-parser (v3.1.4): Downloading (100%)
- Installing jeremeamia/superclosure (2.3.0): Downloading (100%)
- Installing maatwebsite/excel (2.1.24): Downloading (100%)
- Installing owen-it/laravel-auditing (2.3.7): Downloading (100%)
- Installing proengsoft/laravel-jsvalidation (v1.6.1): Downloading (100%)
- Installing rap2hpoutre/laravel-log-viewer (v0.7.1): Downloading (100%)
- Installing sentry/sentry (1.8.2): Downloading (100%)
- Installing sentry/sentry-laravel (0.3.0): Downloading (100%)
- Installing spatie/db-dumper (1.5.1): Downloading (100%)
- Installing spatie/laravel-backup (3.10.1): Downloading (100%)
- Installing thomaswelton/gravatarlib (0.1.0): Downloading (100%)
- Installing thomaswelton/laravel-gravatar (1.1.3): Downloading (100%)
- Installing torann/geoip (1.0.5): Downloading (100%)
- Installing webpatser/laravel-countries (dev-master 2568394): Downloading (100%)
- Installing kalnoy/nestedset (v4.3.1): Downloading (100%)
- Installing xoco70/laravel-tournaments (dev-master 8c9eac5): Downloading (100%)
- Installing symfony/dom-crawler (v3.1.10): Downloading (100%)
- Installing sebastian/version (2.0.1): Downloading (100%)
- Installing sebastian/resource-operations (1.0.0): Downloading (100%)
- Installing sebastian/recursion-context (3.0.0): Downloading (100%)
- Installing sebastian/object-reflector (1.1.1): Downloading (100%)
- Installing sebastian/object-enumerator (3.0.3): Downloading (100%)
- Installing sebastian/global-state (2.0.0): Downloading (100%)
- Installing sebastian/exporter (3.1.0): Downloading (100%)
- Installing sebastian/environment (3.1.0): Downloading (100%)
- Installing sebastian/diff (2.0.1): Downloading (100%)
- Installing sebastian/comparator (2.1.3): Downloading (100%)
- Installing phpunit/php-text-template (1.2.1): Downloading (100%)
- Installing doctrine/instantiator (1.1.0): Downloading (100%)
- Installing phpunit/phpunit-mock-objects (5.0.6): Downloading (100%)
- Installing phpunit/php-timer (1.0.9): Downloading (100%)
- Installing phpunit/php-file-iterator (1.4.5): Downloading (100%)
- Installing theseer/tokenizer (1.1.0): Downloading (100%)
- Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)
- Installing phpunit/php-token-stream (2.0.2): Downloading (100%)
- Installing phpunit/php-code-coverage (5.3.0): Downloading (100%)
- Installing webmozart/assert (1.3.0): Downloading (100%)
- Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%)
- Installing phpdocumentor/type-resolver (0.4.0): Downloading (100%)
- Installing phpdocumentor/reflection-docblock (4.3.0): Downloading (100%)
- Installing phpspec/prophecy (1.7.3): Downloading (100%)
- Installing phar-io/version (1.0.1): Downloading (100%)
- Installing phar-io/manifest (1.0.1): Downloading (100%)
- Installing myclabs/deep-copy (1.7.0): Downloading (100%)
- Installing phpunit/phpunit (6.5.6): Downloading (100%)
- Installing laravel/browser-kit-testing (v2.0.1): Downloading (100%)
- Installing hamcrest/hamcrest-php (v1.2.2): Downloading (100%)
- Installing mockery/mockery (0.9.9): Downloading (100%)
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
symfony/var-dumper suggests installing ext-symfony_debug ()
maximebf/debugbar suggests installing kriswallsmith/assetic (The best way to manage assets)
maximebf/debugbar suggests installing predis/predis (Redis storage)
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/dependency-injection (For loading routes from a service)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/browser-kit ()
symfony/http-kernel suggests installing symfony/config ()
symfony/http-kernel suggests installing symfony/dependency-injection ()
symfony/console suggests installing symfony/lock ()
egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter)
ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).)
ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
symfony/translation suggests installing symfony/config ()
symfony/translation suggests installing symfony/yaml ()
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
laravel/framework suggests installing ext-pcntl (Required to use all features of the queue worker.)
laravel/framework suggests installing laravel/tinker (Required to use the tinker console command (~1.0).)
laravel/framework suggests installing league/flysystem-cached-adapter (Required to use Flysystem caching (~1.0).)
laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (~1.0).)
laravel/framework suggests installing nexmo/client (Required to use the Nexmo transport (~1.0).)
laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (~3.0).)
laravel/framework suggests installing predis/predis (Required to use the redis cache and queue drivers (~1.0).)
laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (~3.0).)
symfony/class-loader suggests installing symfony/polyfill-apcu (For using ApcClassLoader on HHVM)
barryvdh/reflection-docblock suggests installing dflydev/markdown (~1.0)
knplabs/knp-snappy suggests installing h4cc/wkhtmltoimage-amd64 (Provides wkhtmltoimage-amd64 binary for Linux-compatible machines, use version `~0.12` as dependency)
knplabs/knp-snappy suggests installing h4cc/wkhtmltoimage-i386 (Provides wkhtmltoimage-i386 binary for Linux-compatible machines, use version `~0.12` as dependency)
knplabs/knp-snappy suggests installing h4cc/wkhtmltopdf-amd64 (Provides wkhtmltopdf-amd64 binary for Linux-compatible machines, use version `~0.12` as dependency)
knplabs/knp-snappy suggests installing h4cc/wkhtmltopdf-i386 (Provides wkhtmltopdf-i386 binary for Linux-compatible machines, use version `~0.12` as dependency)
knplabs/knp-snappy suggests installing wemersonjanuario/wkhtmltopdf-windows (Provides wkhtmltopdf executable for Windows, use version `~0.12` as dependency)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
lcobucci/jwt suggests installing mdanter/ecc (Required to use Elliptic Curves based algorithms.)
intervention/image suggests installing ext-imagick (to use Imagick based image processing.)
intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)
aws/aws-sdk-php suggests installing aws/aws-php-sns-message-validator (To validate incoming SNS notifications)
spatie/laravel-backup suggests installing irazasyed/telegram-bot-sdk (Allows notifications to be sent using Telegram Bot)
spatie/laravel-backup suggests installing maknz/slack (Allows notifications to be sent via Slack)
thomaswelton/gravatarlib suggests installing twig/twig (>=1.4.0)
torann/geoip suggests installing geoip2/geoip2 (Required to use the MaxMind database or web service with GeoIP (~2.1).)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.5)
phpunit/phpunit suggests installing ext-xdebug (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
Removing intermediate container c4eb03cbb690
But when I run docker compose, and connect to my container, I can see there is no vendor/ folder, I have to execute again composer install that load dependencies from cache.
It is to be mentionned that I also have a .dockerignore that has inside vendor/ directory, but as I understand it, .dockerignore should have an effect on the COPY instruction but then, if it is built inside dockerfile, vendor folder should exist...
Why am I wrong ???
Could you share your docker-compose.yml file?
It is very possible that you are creating a shared volume between your host machine and container using docker-compose. Something that looks like this:
services:
app:
build:
context: .
dockerfile: <path-to-your-Dockerfile>
volumes:
- <your-project-path>:/app
Volumes are created after you have built your image and live outside your image/container.
What this means is that the volume you create can potentially overwrite whatever files you have created or installed when building your image.
.dockerignore is solely for loading the build context, and is not applicable when talking about artifacts that are created by the build process. You can and should keep /vendor in your .dockerignore file if you are recreating that folder/running composer each time you build. It is not necessary for Docker to have access to the contents of this folder in order to build your container and including them will just slow down the build.
The reason that you aren't seeing the /vendor folder after the build is finished is this: You are generating the /vendor folder when you do the composer install --no-interaction step which occurs in an intermediate layer (not the final layer). A build step that happens after this is overwriting the folder along with the artifacts that were generated. This can happen even if the composer step is the last item in your Dockerfile if as #nizar-el-berjawi suggests, you are mounting your source folder as a volume in your docker-compose.yml (presumably so you can develop in the container and update source as you go on the host), Docker will run a final mount step that will generate a layer on top of what you have in your Dockerfile. When Docker mounts the source directory, it overwrites the copy that it made during the build with the host source directory that is missing the /vendor sub-directory. Poof!
So to ensure that the /vendor folder is kept in the container, there are several options:
Move the composer install step in your Dockerfile into the final CMD command that specifies what to do when the container loads (and happens after volumes are mapped). Something like:
CMD composer install --no-interaction
&&\ ["/tmp/entrypoint.sh"]
Note that in this scenario, the container build will finish before composer install is complete/done, so if you use docker-compose build up [...etc] to build then your app will not be done building and will not be available until the composer step is complete. You can manually track the composer progress using docker logs on the host machine:
docker logs --follow [image_name/container_id]
To exit the log watcher press the Q key
If you require knowledge of completeness (e.g. for automated testing) this method isn't recommended (use one of the below methods instead)
Don't map your host source volume to the application directory. This will stop Docker from overwriting the folder but changes you make in the container will not propagate to the host. This is fine for a production build. On dev builds where you need to propagate code changes in the container back to the host or vice versa for testing, you can map the folder (use a separate docker-compose.yml file for these build targets). You'll have to run the composer install command manually in the container or on the host using docker exec after the build finishes:
docker exec -it [image_name/container_id] composer install --no-interaction
Move the /vendor folder after the composer step to a location that isn't being used for a volume in docker-compose.yml (e.g. /tmp/vendor ) and copy it back in the CMD section of your Dockerfile so that it is restored from the build whenever the container is (re)started.
RUN mv vendor /tmp/vendor
CMD cp -a /tmp/vendor vendor && ["/tmp/entrypoint.sh"]
The vendor directory is required for autoload application so when you ignore it in .dockerignore, docker COPY could not copy this directory as part of your code base and it caused Internal Server Error.
The good practice might be use pipline cache and artifact between stages and copy source code with vendor directory in Dockerfile.

incomplete dependencies in laravel

When i created a project using composer
C:\xampp\htdocs>composer create-project laravel/laravel tipar 5.4.*
Installing laravel/laravel (v5.4.30)
- Installing laravel/laravel (v5.4.30): Loading from cache
Created project in tipar
php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 59 installs, 0 updates, 0 removals
- Installing symfony/css-selector (v3.3.9): Loading from cache
- Installing tijsverkoyen/css-to-inline-styles (2.2.0): Loading from cache
- Installing symfony/polyfill-mbstring (v1.5.0): Loading from cache
- Installing symfony/var-dumper (v3.3.9): Loading from cache
- Installing jakub-onderka/php-console-color (0.1): Loading from cache
- Installing jakub-onderka/php-console-highlighter (v0.3.2): Loading from cache
- Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
- Installing nikic/php-parser (v3.1.1): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing symfony/debug (v3.3.9): Downloading (100%)
- Installing symfony/console (v3.3.9): Downloading (100%)
- Installing psy/psysh (v0.8.11): Loading from cache
- Installing vlucas/phpdotenv (v2.4.0): Loading from cache
- Installing symfony/routing (v3.3.9): Loading from cache
- Installing symfony/process (v3.3.9): Loading from cache
- Installing symfony/http-foundation (v3.3.9): Downloading (100%)
this is the only output i get, there are some files that are missing.

Deploying Laravel to Heroku - problems with Jeffrey Way's Generators

So, I'm trying do deploy my Laravel project to Heroku.
In my Vendor folder I have Jeffrey Way's Generators installed [/Vendor/Way]. And it seems like Heroku doesn't have it. I get the following whet I run git push heroku master
Initializing repository, done.
Counting objects: 88, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (73/73), done.
Writing objects: 100% (88/88), 34.47 KiB | 0 bytes/s, done.
Total 88 (delta 4), reused 0 (delta 0)
-----> PHP app detected
-----> No runtime requirements in composer.json, defaulting to PHP 5.6.1.
-----> Installing system packages...
- PHP 5.6.1
- Apache 2.4.10
- Nginx 1.6.0
-----> Installing PHP extensions...
- zend-opcache (automatic; bundled, using 'ext-zend-opcache.ini')
-----> Installing dependencies...
Composer version 73e9db5d9952d52a46ecbc20a269a8c5f9c5b011 2014-10-07 15:03:19
Loading composer repositories with package information
Installing dependencies from lock file
- Installing symfony/translation (v2.5.5)
Downloading: 100%
- Installing symfony/security-core (v2.5.5)
Downloading: 100%
- Installing symfony/routing (v2.5.5)
Downloading: 100%
- Installing symfony/process (v2.5.5)
Downloading: 100%
- Installing symfony/http-foundation (v2.5.5)
Downloading: 100%
- Installing symfony/event-dispatcher (v2.5.5)
Downloading: 100%
- Installing symfony/debug (v2.5.5)
Downloading: 100%
- Installing psr/log (1.0.0)
Downloading: 100%
- Installing symfony/http-kernel (v2.5.5)
Downloading: 100%
- Installing symfony/finder (v2.5.5)
Downloading: 100%
- Installing symfony/dom-crawler (v2.5.5)
Downloading: 100%
- Installing symfony/css-selector (v2.5.5)
Downloading: 100%
- Installing symfony/console (v2.5.5)
Downloading: 100%
- Installing symfony/browser-kit (v2.5.5)
Downloading: 100%
- Installing swiftmailer/swiftmailer (v5.3.0)
Downloading: 100%
- Installing stack/builder (v1.0.2)
Downloading: 100%
- Installing predis/predis (v0.8.7)
Downloading: 100%
- Installing phpseclib/phpseclib (0.3.8)
Downloading: 100%
- Installing patchwork/utf8 (v1.1.25)
Downloading: 100%
- Installing nesbot/carbon (1.13.0)
Downloading: 100%
- Installing monolog/monolog (1.11.0)
Downloading: 100%
- Installing nikic/php-parser (v0.9.5)
Downloading: 100%
- Installing jeremeamia/superclosure (1.0.1)
Downloading: 100%
- Installing ircmaxell/password-compat (1.0.3)
Downloading: 100%
- Installing filp/whoops (1.1.2)
Downloading: 100%
- Installing d11wtq/boris (v1.0.8)
Downloading: 100%
- Installing symfony/filesystem (v2.5.5)
Downloading: 100%
- Installing classpreloader/classpreloader (1.0.2)
Downloading: 100%
- Installing laravel/framework (v4.2.11)
Downloading: 100%
Generating optimized autoload files
PHP Fatal error: Class 'Way\Generators\GeneratorsServiceProvider' not found in /tmp/build_5ed58964-00a1-4095-976d-3975a31d73d8/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Way\\Generators\\GeneratorsServiceProvider' not found","file":"\/tmp\/build_5ed58964-00a1-4095-976d-3975a31d73d8\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/ProviderRepository.php","line":157}}Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Way\Generators\GeneratorsServiceProvider' not found in /tmp/build_5ed58964-00a1-4095-976d-3975a31d73d8/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
! Push rejected, failed to compile PHP app
To git#heroku.com:tranquil-shore-5073.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:tranquil-shore-1111.git'
Why does it happens? How can I solve it?
Thanks a lot!
So here is my guide how to do it in Homestead. 1. Open terminal and do $ vagrant ssh 2. Change directory to your project [ex: $ cd Code/webdev.local]3. Run $ composer require way/generators --dev [you can actually skip this step]4. Update your project's composer.json "way/generators" to "dev-master" or "2.*" or "~3.0" - depending on your larval version [ex:
"require-dev": {
"way/generators": "dev-master"
}
]5.Run $composer update 6. Navigate to your project and to app/config/local/app.php (if you don't have local folder - create it and then create app.php which starts like app.php) and set there 'providers'=>array('Way\Generators\GeneratorsServiceProvider'), 7. Run php artisan to check the commands
Worked just fine for me!

Resources