laroute
laroute copied to clipboard
Template laroute.js not found when executing laroute:generate from outside the base application install folder
I am using deployer to deploy my site to production. One of the tasks I defined was as follows
task('artisan:laroute:generate', function () {
run('{{bin/php}} {{release_path}}/artisan laroute:generate');
});
However I get the following error when deploying:
Executing task artisan:laroute:generate
[mysite.com] > /usr/local/bin/php ~/releases/12/artisan laroute:generate
[mysite.com] < stdin: is not a tty
[mysite.com] < File does not exist at path vendor/lord/laroute/src/templates/laroute.js
When running the command manually on the server it works.
Any ideas ?
Did you do it after the composer install?
I actually found the issue was that when executing artisan from outside the base install folder the path of the template files could not be resolved.
For example if my application was installed in /var/www
and I was in /var
trying to execute php artisan like so :
$ /var: php www/artisan laroute:generate
The path defined in config laroute.php
broke down and could not be resolved since it was looking in the /var
folder.
This PR should get it fixed : https://github.com/aaronlord/laroute/pull/81