3

I am trying to collaborate with other developers on the project that I am working.

I pulled the latest commit by my friend and trying to run the application. I tried the following command :

php artisan migrate

but got the following error:

PHP Warning:  require(/var/www/html/assuresale/vendor/composer/../guzzlehttp/psr7/src/functions_include.php): failed to open stream: No such file or directory in /var/www/html/assuresale/vendor/composer/autoload_real.php on line 66
PHP Fatal error:  require(): Failed opening required '/var/www/html/assuresale/vendor/composer/../guzzlehttp/psr7/src/functions_include.php' (include_path='.:/usr/share/php') in /var/www/html/assuresale/vendor/composer/autoload_real.php on line 66

I am using Laravel and assuresale is the name of my project. And the localhost is showing nothing.

And I have already edited the .env according to the need.

7
  • 1
    Try running composer dump-autoload and check if it fixes it. Commented May 28, 2017 at 16:15
  • those packages are missing thus the error, try to run composer package.json Commented May 28, 2017 at 16:19
  • @Sandeesh i tried it. didnt work Commented May 28, 2017 at 17:49
  • @Exprator It didnt work. Commented May 28, 2017 at 17:49
  • 1
    @dawn are you committing the composer.json file? Check if your composer configs are in sync and run composer install once. Also it's always a good idea to commit the composer.lock in collaborative development to keep the package versions in sync. Commented May 28, 2017 at 17:52

1 Answer 1

2

When creating a migration, not only a script is created in the database folder, but the script is also listed in the autoload files, which are ignored by default from git repositories.

Now that you have downloaded the modifications of your coworkers, your autoload files are out of date. update them using:

composer dump-autoload
Sign up to request clarification or add additional context in comments.

1 Comment

This helped but I kept getting other errors. And finally "composer install" solved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.