I tried setup my laravel project in forge where whenever I deploy, it should run npm install and npm run prod.
But, the issue i am facing now which I have no idea why is that when I add npm install and npm run prod, it is complaining pngquant failed to build, make sure that libpng-dev is installed.
cd /home/forge/example.com
git pull origin master
npm install
npm run prod
composer install --no-interaction --prefer-dist --optimize-autoloader
echo "" | sudo -S service php7.2-fpm reload
if [ -f artisan ]
then
php artisan migrate --force
fi
So, I go ahead and added sudo apt-get install -y libpng-dev, now I am facing another issue where it complains sudo: no tty present and no askpass program specified.
cd /home/forge/example.com
git pull origin master
sudo apt-get install -y libpng-dev
npm install
npm run prod
composer install --no-interaction --prefer-dist --optimize-autoloader
echo "" | sudo -S service php7.2-fpm reload
if [ -f artisan ]
then
php artisan migrate --force
fi
Can anyone know what is going on or help me please?