Does "js-components" get created automatically when you import the "vue" package?

Bruce Gust
Bruce Gust used Ask the Experts™
on
I'm working through this tutorial: https://www.youtube.com/watch?v=DJ6PD_jBtU0

At one point, it asks you to do an "npm install" and you're loading up these dependencies:

  "devDependencies": {
        "axios": "^0.19",
        "cross-env": "^5.1",
        "laravel-mix": "^4.0.7",
        "lodash": "^4.17.13",
        "resolve-url-loader": "^2.3.1",
        "sass": "^1.15.2",
        "sass-loader": "^7.1.0",
        "vue-template-compiler": "^2.6.10"
    }

Not more than a couple of minutes later in the tutorial, it asks you to go to the "resources -> assets -> js -> components" directory and create a .vue file.

The folder doesn't exist. There is no "components" directory and I'm wondering, since the tutorial didn't specify creating it if perhaps something was supposed to happen when I did the "npm install."

I can obviously create it, but I'm new to Laravel and I'm wondering if the "vue-template-compiler" wasn't supposed to create that and something went wrong.

Does "assets ->js-components" get created when you load in the .vue dynamic? Or can I just create that myself and Laravel will know to refer to that when I start creating the .vue files?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Multitechnician
Top Expert 2014
Commented:
you're supposed to clone the project, run the command in Quick Start until you reach the point "npm install" (which is in the Quick Start too)

As you can see the folder is already present in the project you're going to clone :
https://github.com/bradtraversy/larticles_vue_app/tree/master/resources/assets/js/components

1) Clone project
2) Go to Quick Start section to run all the command until the "npm install" to be synchronized with the tutorial
3) Follow tutorial
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
npm only installs dependencies which go to the node_modules folder - project folder structure is up to you to create or as in this case, and as leakim points out, comes with the cloned project
Bruce GustPHP Developer

Author

Commented:
Well, the project in question comes from a previous tutorial that ran through how to set up RESTful APIs which I completed. The directories and the .vue files were not a part of the lesson, or I must've missed something. Either way, y'all answered my question in that I just need to set up a couple of folders and not feel like there as an artisan command that missed that magically set up several directories.

Thanks!
Bruce GustPHP Developer

Author

Commented:
Happy Thanksgiving, gentlemen!
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
You are welcome Bruce

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