bref icon indicating copy to clipboard operation
bref copied to clipboard

Error file directory not found when running Bref CLI in AWS codebuild

Open CodeByTwo opened this issue 3 years ago • 1 comments

Description:

We are deploying our Laravel app on AWS Lambda using Bref plugin. We have been running the artisan migrate command in the Codebuild environment for sometime however it has stopped working. Example command running in Codebuild project is vendor/bin/bref cli function-name-artisan --region eu-west-2 -- migrate. The error produced is vendor/bin/bref: 1: ../bref/bref/bref: not found

We have verified that the codebuild is in the correct root folder of the code. Vendor folder is visible and all its contents.

Codebuild environment is running php 8.1. Both application and artisan layers on the lambda function are running php8.1

layers: - ${bref:layer.php-81} - ${bref:layer.console} # The "console" layer

How to reproduce:

Attempt to run vendor/bin/bref cli function-name-artisan --region eu-west-2 -- migrate from AWS Codebuild.

Running from local machine is working successfully.

CodeByTwo avatar Sep 12 '22 16:09 CodeByTwo

The error is vendor/bin/bref: 1: ../bref/bref/bref: not found, which means the Bref package doesn't look like it's correctly installed by Composer for some reason (because the file is not found).

Could you check why this file doesn't exist? Are you manually removing any file before the command is run?

mnapoli avatar Sep 13 '22 14:09 mnapoli

Closing because of inactivity.

mnapoli avatar Oct 20 '22 11:10 mnapoli