deployer PHP Warning: require(recipe/....php) Решение для подключения из vendor-a

PHP Warning: require(recipe/npm.php): failed to open stream: No such file or directory in ....deploy.php on line ..

Решение

можно подключить по прямому пути из vendor-a:

require __DIR__ . '/vendor/deployer/recipes/recipe/npm.php';

например:

<?php
namespace Deployer;
require 'recipe/common.php';
require __DIR__ . '/vendor/deployer/recipes/recipe/npm.php';

set('ssh_type', 'native');
set('ssh_multiplexing', true);
// .......................
// ..........

desc('Deploy project');
task('deploy', [
    'deploy:prepare',
    'deploy:lock',
    'deploy:release',
    'deploy:update_code',
    'npm:install', // ставим зависимости вебпака (стандартное задание)
    'webpack_build', // собираем
    'deploy:shared',
    'deploy:writable',
    'deploy:vendors',
    'deploy:clear_paths',
    'deploy:run_migrations',
    'deploy:symlink',
    'deploy:unlock',
    'cleanup',
    'success',
]);

// Сборка фронта
task('webpack_build', function () {
    run('cd {{release_path}} && npm run build');
});

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');