Undefined index error for php artisan vendor:publish
In QuestionHelper.php line 53:
Undefined index:
run this command php artisan vendor:publish
Which packages do you have installed?
We would need a full stack trace to debug this further. This is probably a specific package that has a bad call to the ask method.
Please ask on the forums, this repo is for bug reporting only. You can use https://laracasts.com/discuss or https://laravel.io/forum which are forums with a very large community of developers helping each other.
This issue occurs after installing fresh laraval using this command composer create-project --prefer-dist laravel/laravel blog
Can you give us a full stacktrace of the problem? It should be available in the log files in storage/logs.
I have had this issue too, here's the stack trace:
[2018-02-14 13:59:28] local.ERROR: Undefined index: {"exception":"[object] (ErrorException(code: 0): Undefined index: at /home/vagrant/code/osaris/vendor/symfony/console/Helper/QuestionHelper.php:53)
[stacktrace]
"}
i got the same problem... any ideas?
@felipemarques We would probably need an application we could clone and reproduce the problem locally to attempt to at least provide a better error message or fix the problem.
One thing I have realised is that vendor:publish requires arguments, such as the vendor to publish... Defining the arguments should bypass the question helper, as this is being called to allow selection of what to publish.
Not exactly a fix, but hope it helps...
Try to add something like --provider="Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider"
I also got the same problem...please give some idea...
if I add --provider=\"Stevenyangecho\UEditor\UEditorServiceProvider\" will no error, but also no files moved..
@RoachCn How is that the same problem? This issue is about a "Undefined index" error, and you say you have no error. It doesn't sound related at all.
The error is due to the fact that vendor:publish is interactive since Laravel 5.5, and you have to confirm which vendors you want to publish. If you just run it in a shell script with no arguments, the system won't receive a list of vendors to publish, hence the error.
If you want to avoid this error in your script, you need to add the "--all" argument to the publish command, like this:
php artisan vendor:publish --all
Most helpful comment
We would need a full stack trace to debug this further. This is probably a specific package that has a bad call to the ask method.