I have started new Laravel project using latest version (5.7.19) and it is shipped with Laravel Mix 4.0.7. In this project I don't need any frontend scaffolding so I removed Vue scaffolding. After that when I ran npm install and then npm run watch I am getting this in the console:
Additional dependencies must be installed. This will only take a moment.
Running: yarn add vue-template-compiler --dev --production=false
warning " > [email protected]" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".Okay, done. The following packages have been installed and saved to your package.json dependencies list:
- vue-template-compiler
Why Laravel Mix 4 install this additional and obviously redundant package vue-template-compiler on the fly when I have removed Vue from scaffolding and how to get a rid of that package?
After all, I have tried to use Laravel Mix 4.0.7 and 4.0.12 - same thing in both cases.
php artisan preset nonenpm installnpm run watchI have a similar problem without setting preset to none, but using default one shipped for Laravel.
I was able to run my npm run ... after
npm install vue-template-compiler
My project is using react and yet it still installs this package.
Mix has always installed this package. The only difference is it's now being pulled in locally.
Mix was originally built with Vue in mind, so until the next major release, this dependency needs to stay. Just ignore it.
I do not want to have vue-template-compiler dependency in my package.json file. Can it not be forced to install?
Hey, @JeffreyWay you mentioned that this dependency needs to stay until the next major release.
I am on v5 right at the moment and still getting it. Any chance removing it anytime soon?
If you need a quick-fix before my PR is merged, I also gived a hack to remove the dependency by hand. https://github.com/JeffreyWay/laravel-mix/issues/1877#issuecomment-596111404
Most helpful comment
Hey, @JeffreyWay you mentioned that this dependency needs to stay until the next major release.
I am on v5 right at the moment and still getting it. Any chance removing it anytime soon?