When I run my gulpfile.js
file with the following command: gulp --gulpfile gulpfile.js
shows this error:
16:37:24] Using gulpfile ~/www/webpage/gulpfile.js
[16:37:24] Starting 'all'...
[16:37:24] Starting 'task'...
[16:37:24] Starting 'js-langs'...
[16:37:24] Finished 'task' after 7.75 ms
[16:37:24] Starting 'webpack'...
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn php artisan vue-i18n:generate ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
at Function.Module.runMain (module.js:444:11)
at startup (node.js:136:18)
at node.js:966:3
The lines in the gulpfile.js
file that cause this error are these:
gulp.task('js-langs', shell.task([
"php artisan vue-i18n:generate",
]));
And if I execute the php artisan vue-i18n:generate
command in the terminal, it runs fine.
Written to /home/lluisdev/www/webpage/resources/assets/js/lib/locales/vue-i18n-locales.generated.js
Do you know what causes the error? Any way to fix it?
I installed vue-i18n with the following command:
npm install vue-i18n --save
and installed correctly, but the error persists.