Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed opening required '/var/www/bootstrap/../vendor/autoload.php' #119

Open
bugcy013 opened this issue Nov 17, 2018 · 4 comments
Open

Comments

@bugcy013
Copy link

Hi Guys,

When we try to install with docker. I am getting this exception. please guide me. How to fix this

steps to reproduce

/wiki$ php composer.phar create-project ziishaned/opus


                                                                
  [InvalidArgumentException]                                    
  Could not find package ziishaned/opus with stability stable.  
                                                                

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

$ git clone https://github.com/ziishaned/opus.git
$ cp .env.dist .env

tech@dvwhk-:~/wiki/opus$ docker-compose up -d
Building app
Step 1/3 : FROM php:7.2-fpm
 ---> 9d11d506e313
Step 2/3 : RUN apt-get update   && apt-get install -y git zip libmcrypt-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev mysql-client libmagickwand-dev   && apt-get clean   && pecl install mcrypt imagick   && docker-php-ext-enable imagick   && docker-php-ext-install pdo_mysql   && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 ---> Using cache
 ---> c8f73f9895e4
Step 3/3 : WORKDIR /var/www
 ---> Using cache
 ---> ad027695adbe
Successfully built ad027695adbe
Building web
Step 1/3 : FROM nginx:1.10
 ---> 0346349a1a64
Step 2/3 : ADD ./vhost.conf /etc/nginx/conf.d/default.conf
 ---> Using cache
 ---> bf324e771887
Step 3/3 : WORKDIR /var/www
 ---> Using cache
 ---> 0e0ba173d8b0
Successfully built 0e0ba173d8b0
Starting opus_mysql_1
Starting opus_app_1
Starting opus_web_1
tech@dvwhk-:~/wiki/opus$ docker-compose exec app php artisan key:generate

Warning: require(/var/www/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/bootstrap/autoload.php on line 17

Fatal error: require(): Failed opening required '/var/www/bootstrap/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/bootstrap/autoload.php on line 17
tech@dvwhk-:~/wiki/opus$ 
@Grejeru
Copy link

Grejeru commented Nov 19, 2018

I have same problem with create-project, it's shouting about stability stable. Using composer v1.7.3 (on macOS Mojave installed via brew install composer)

@bugcy013 after cloning repo You should run composer install inside opus directory to install all requirements into vendor directory.

@Vinayak90
Copy link

composer create-project zeeshanu/opus

@sistemmsn
Copy link

sistemmsn commented Jun 11, 2019

Hi Guys,

When we try to install with docker. I am getting this exception. please guide me. How to fix this

steps to reproduce

/wiki$ php composer.phar create-project ziishaned/opus


                                                                
  [InvalidArgumentException]                                    
  Could not find package ziishaned/opus with stability stable.  
                                                                

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

$ git clone https://github.com/ziishaned/opus.git
$ cp .env.dist .env
tech@dvwhk-:~/wiki/opus$ docker-compose up -d
Building app
Step 1/3 : FROM php:7.2-fpm
 ---> 9d11d506e313
Step 2/3 : RUN apt-get update   && apt-get install -y git zip libmcrypt-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev mysql-client libmagickwand-dev   && apt-get clean   && pecl install mcrypt imagick   && docker-php-ext-enable imagick   && docker-php-ext-install pdo_mysql   && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
 ---> Using cache
 ---> c8f73f9895e4
Step 3/3 : WORKDIR /var/www
 ---> Using cache
 ---> ad027695adbe
Successfully built ad027695adbe
Building web
Step 1/3 : FROM nginx:1.10
 ---> 0346349a1a64
Step 2/3 : ADD ./vhost.conf /etc/nginx/conf.d/default.conf
 ---> Using cache
 ---> bf324e771887
Step 3/3 : WORKDIR /var/www
 ---> Using cache
 ---> 0e0ba173d8b0
Successfully built 0e0ba173d8b0
Starting opus_mysql_1
Starting opus_app_1
Starting opus_web_1
tech@dvwhk-:~/wiki/opus$ docker-compose exec app php artisan key:generate

Warning: require(/var/www/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/bootstrap/autoload.php on line 17

Fatal error: require(): Failed opening required '/var/www/bootstrap/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/bootstrap/autoload.php on line 17
tech@dvwhk-:~/wiki/opus$ 

But in your server you're missing ext-dom. php7.1-xml has all the related packages you need. So, you can simply install it by running:

sudo apt-get update
sudo apt-get install php7.1-xml
sudo apt-get install php-mbstring
composer update --no-scripts
Most likely you are missing mbstring too. If you get the error, install this package as well with:

sudo apt-get install php-mbstring
Then run:

composer update

@daniellivingston
Copy link

I have this issue as well. For the meantime, I am doing:

$ composer diagnose -vvv
$ git clone https://github.com/ziishaned/opus.git
$ cd opus/
$ composer create-project

and all seems to be going well (download and installing packages currently). I will update with more info later.


I first tried to adjust the --stability flag, i.e.:

$ composer create-project --stability dev ziishaned/opus

but this failed for each stability option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants