0

I hope it's possible since I really can't find a lot about this on the internet.

I'm trying to run gulp from a route in laravel. The only way I got it working to run gulp and give me an output is to use a php artisan command.

php artisan command: gulp:minify-generic-images

If I do from the console: php artisan gulp:minify-generic-images it all works as it's supposed to.

So I created a route:

$router->group(['prefix' => 'admin'], function () use ($router) {
    $router->get('gulp-minify-generic-images/{campaign}', function ($campaign) {
        $output = Artisan::call('gulp:minify-generic-images');
        var_dump($output);
    });
});

This should minify some generic images to the public folder. I also have other gulp commands to create webfonts for example.

The error I'm getting on the web is the following:

fontgen/node_modules/fontfacegen/lib/commands.js:38
        throw new FontFaceException(

FontFaceException: We are missing some required font packages.
That can be installed with:
sudo apt-get install fontforge

Offcourse I have install fontforge using the sudo apt-get install fontforge method but it says it's allready installed. Offcourse it's installed because I'm also using it from the command line.

This all only has to work locally in homestead/vagrant. Really hope someone can help me out. If I need to provide additional information just let me know.

Thank you for your time taken.

3
  • does the user you're running php have access to the font installed on the system? May 21, 2018 at 13:49
  • I checked which user is being used with "id -u" and then they both return the same user
    – Graham
    May 22, 2018 at 7:28
  • If the command is fontforge -v it does give me information about fontforge. That’s the strange part.
    – Graham
    May 22, 2018 at 19:47

0

Your Answer

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