lighthouse-php icon indicating copy to clipboard operation
lighthouse-php copied to clipboard

Error status code 1 but works from command line

Open craig-stanfield opened this issue 7 years ago • 3 comments

Hi,

I'm struggling to get this to work. I've tried with the default setup from the md file to audit google.com This threw an error which i dubugged to be that it couldn't find the config file. I added a withConfig pointing to the default config in the node_module folder again i got an error code 1 (general error). I noticed on the other issue on here to add setLighthousePath and again error code 1. If i take the command generated and run it in terminal it works and generates the report. Any suggestions?

My code as follows: `use Dzava\Lighthouse\Lighthouse;

    $url = 'https://google.com';
    $path = 'google.json';
    (new Lighthouse())
        ->setOutput($path)
        ->accessibility()
        ->bestPractices()
        ->performance()
        ->pwa()
        ->seo()
        ->setLighthousePath('./node_modules/lighthouse/lighthouse-cli/index.js')
        ->withConfig('./node_modules/lighthouse/lighthouse-core/config/default-config.js')
        ->audit($url);`

both the index.js and the default-config.js are in the locations specified with respect to the document root I've also tried with the full path (which results in a timeout)

I'm develeping this on a win 10 box with wamp 64 with php7.1.30 on it. Once working it will be on an ubuntu server

craig-stanfield avatar Jun 24 '19 11:06 craig-stanfield

It seems to be an issue with Symfony rather than this project.

craig-stanfield avatar Jun 24 '19 13:06 craig-stanfield

I've downgraded symfony / process from 4.3 to 2.4.50 but no change. still it exits with code 1. I've also put all changes on the ubuntu server and likewise it exits with code 1 and the command generated runs if put in the command line. Any ideas?

craig-stanfield avatar Jun 25 '19 10:06 craig-stanfield

i reinstalled composer on the remote and my code started working.

craig-stanfield avatar Jun 25 '19 12:06 craig-stanfield