Vue Not Being Included With Laravel Install

Bruce Gust
Bruce Gust used Ask the Experts™
screenshotI've got Laravel 6.6.0 running on my box. I do a new project and I go to my "resources" directory expecting to find "resources->js-assets->components->ExampleComponent.vue" and there's nothing there. All I have is "resources->js."

The idea that all this is coming pre-packaged comes from any one of a number of tutorials. Here's an example:

When I do an "npm install," I get this (see screenshot)...

Notice how vue is referenced as "@vue." Not sure if that's indicative of a problem, but I there is no hierarchy and there's no "ExampleComponent.vue" and I'm thinking something is fouled up, but I don't know what.

Seems like all of this should in place by default and it's not. Why?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2018
Distinguished Expert 2018
Hey Bruce,

The pre-installed Vue component is part of Laravel 5 scaffolding, but it's been removed in Laravel 6. You now need to manually add it and then tell Laravel to use it. You install it with Composer and then activate it with the artisan command:

composer require laravel/ui --dev
php artisan ui vue

Open in new window

The thinking behind this is that it leaves the decision of which UI framework to use up to the developer (React / Bootstrap / Vue etc).

FYI - the @ symbol is just a way to scope or group node packages
Bruce GustPHP Developer


Chris, if there was a value for "out of the park" helpful, I would've selected it.

I can't tell you how much time was spent in an attempt to figure this out with various bandaids and google searches. Your counsel did the trick and I'm just sorry I didn't respond sooner.

Most Valuable Expert 2018
Distinguished Expert 2018

Haha. No worries Bruce. Glad you got it sorted.

Often, the tutorials and code snippets you find online take a while to catch up with the latest releases - particularly when dealing with major release updates (5.x -> 6.x)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial