Problems with the vendor/bin folder of an Laravel application

Asked

Viewed 236 times

0

I’m trying to deploy a standard application to both AWS(Amazon Web Services) and Heroku, and both have reported phpunit errors inside the vendor folder.

After several searches (which already cost me about 6 hours) I finally found the error inside vendor/bin folder where virtually all files are corrupted.

These are the corrupted files:

inserir a descrição da imagem aqui

They have the following mistakes:

Ex: vendor/bin/Dep

    #!/usr/bin/env sh

dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../deployer/deployer/bin" && pwd)

if [ -d /proc/cygdrive ]; then
    case $(which php) in
        $(readlink -n /proc/cygdrive)/*)
            # We are in Cygwin using Windows php, so the path must be translated
            dir=$(cygpath -m "$dir");
            ;;
    esac
fi

"${dir}/dep" "$@"

Ex: vendor/bin/php-parse:

#!/usr/bin/env sh

dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../nikic/php-parser/bin" && pwd)

if [ -d /proc/cygdrive ]; then
    case $(which php) in
        $(readlink -n /proc/cygdrive)/*)
            # We are in Cygwin using Windows php, so the path must be translated
            dir=$(cygpath -m "$dir");
            ;;
    esac
fi

"${dir}/php-parse" "$@"

And some others too.

Any idea how to fix this?

1 answer

1

Deletes vendor folder, adds in . gitignore and in vpn runs the composer install.

  • It is interesting to delete Composer.lock as well.

  • I did exactly what you said, deleted the vendor, and also what Cypherpotato said and deleted Poser.lock, and it was still a mistake, so I read several gringo tutorials and I realized that the mistake was because some of the dependencies that were in require-dev were being needed in require, so I started putting one by one the dependencies of require-dev in require as they gave error, but that would take a long time so I copied and pasted everything, now I have another error, when I use "Heroku open", do not open the site, error appears "Could not access this site". Any idea ?

  • By the way, I’ve already set up Procfile.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.