mercredi 29 mai 2019

Laravel Command outputs different version of node than command line

I upgraded my node to v10.16.0 on a server containing a running Laravel instance.

This is the output after upgrade:

$ node -v
v10.16.0

This is the ouptut from running the Laravel scheduled command manually and echo-ing the response:

$ php artisan custom:command
v10.16.0

This is the output when that command is run by Laravel on it's 5 minute schedule:

v6.14.3

Laravel command is as follows:

$process = new Process("node -v");
$process->run();

How is this possible? Surely Laravel just runs a command on the command line in the same way you'd use exec() and thus should be on the same version. Even php artisan seems to get the right version.



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/30POvQx
via IFTTT

Aucun commentaire:

Enregistrer un commentaire