martinlindhe / laravel-vue-i18n-generator

Generates a vue-i18n compatible include file from your Laravel translations
MIT License
306 stars 207 forks source link

php artisan vue-i18n:generate failed #60

Closed weiloon1234 closed 6 years ago

weiloon1234 commented 6 years ago

HI

there is an error when running the command php artisan vue-i18n:generate

"laravel/framework": "5.7.*"
"martinlindhe/laravel-vue-i18n-generator": "^0.1.29"

vue-i18n@^8.1.0:

below is the error message i get with php artisan vue-i18n:generate -v

E:\web\vervelsgroup\test.local\vendor\martinlindhe\laravel-vue-i18n-generator\src\Commands\GenerateInclude.php:48

MartinLindhe\VueInternationalizationGenerator\Commands\GenerateInclude::handle()
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:29

call_user_func_array([])
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:29

Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:87

Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure))
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:31

Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), [])
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Container\Container.php:564

Illuminate\Container\Container::call()
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Console\Command.php:183

Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
E:\web\vervelsgroup\test.local\vendor\symfony\console\Command\Command.php:251

Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Console\Command.php:170

Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
E:\web\vervelsgroup\test.local\vendor\symfony\console\Application.php:886

Symfony\Component\Console\Application::doRunCommand(Object(MartinLindhe\VueInternationalizationGenerator\Commands\GenerateInclude), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
E:\web\vervelsgroup\test.local\vendor\symfony\console\Application.php:262

Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
E:\web\vervelsgroup\test.local\vendor\symfony\console\Application.php:145

Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Console\Application.php:89

Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
E:\web\vervelsgroup\test.local\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:122

Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
E:\web\vervelsgroup\test.local\artisan:37
weiloon1234 commented 6 years ago

laravel 5.7 vue file at location at resources\js\ instead of resources\assets\js

vendor\martinlindhe\laravel-vue-i18n-generator\src\Commands\GenerateInclude.php:48 writing to assets folder which doesn't exists for laravel 5.7, thats why the error

change the config\vue-i18n-generator.php jsPath and jsFile removed the assets will fix

martinlindhe commented 6 years ago

Thank you for reporting this! For now I have updated the README with a notice in https://github.com/martinlindhe/laravel-vue-i18n-generator/commit/012424e1e167567b59a39b6e767e36128c4a123e