I am using all the default settings, but when I run npm run webpack, I get the following error:
Module parse failed:
/Users/Workspace/barcode/resources/assets/js/components/Events/Tickets.vue Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| <template>
| <div class="Tickets">
| <div class="row">
I am pretty sure it's my own fault, but I can't figure it out
More information, please. What does your webpack.mix.js file look like?
Only mix.js('resources/assets/js/app.js', 'public/js/');. webpack.config.js copied from the setup directory as stated in the documentation.
What do you have for app.js and Tickets.vue?
Nothing special, really: https://gist.github.com/sailingdeveloper/6d46cb1055b15c4f4b338057121ba25a
I did notice, however, that the documentation is different from the way you described it in the Laracasts video in the Vue series.
Hello,
If you use the default webpack.config.js
Make sure that you import/use laravel-mix like so:
let mix = require('laravel-mix').mix
And then run your npm script again.
@zue666 Same


Weirdest thing: I just created a fresh Laravel app (develop), pulled in laravel-mix and set it up according to the documentation, and everything does work... I am running this on my Mac at work, so I will try to figure out what I did wrong at home.
What mix version that you use? I just believe you aren't using the newest version of the Laravel Mix.
I'm going to close this, if you got it working after all. :)
I found out what's wrong: I installed Laravel Mix in a project that already has Laravel Elixir installed. When I removed laravel-elixir frompackage.json, removed thenode_modules directory and reinstalled, everything worked correctly.
Oh my gosh this is a huge red flag this should be in the docs I spent a lot of time on this today!
Thanks for the response.. Huge time saver 馃憤
Most helpful comment
I found out what's wrong: I installed Laravel Mix in a project that already has Laravel Elixir installed. When I removed laravel-elixir from
package.json, removed thenode_modulesdirectory and reinstalled, everything worked correctly.