vincej's avatar
Level 15

Mix: Vue Component refuses to compile

I recently reinstalled my production server. Now, when I run Mix I get this error:

ERROR in ./resources/js/app.js 22:28-72 Module not found: Error: Can't resolve './components/Front.vue' in '/var/www/html/resources/js'

The stupid thing is the vue component is not spelled with a capital "F" so that would be the obvious reason for the failure. The actual component is spelled front.vue, and in my webpack.mix file I have it correctly spelled together with everything else.

mix.js(["resources/js/app.js","resources/js/functions.js","resources/js/teachersTimes.js","resources/js/manualRegistration.js","resources/js/components/front.vue"], "public/js/app.js").vue()
    .css("resources/css/app.css", "public/css")
    .css("resources/css/default.css", "public/css")
    .sourceMaps();

So, I am totally at a loss at to why this is happening.

Many thanks !

0 likes
1 reply
vincej's avatar
Level 15

Ok - I solved my own problem. Foolishly I added "resources/js/components/front.vue"` into the mix.js. Components are pulled in through resources/js/app.js``

Please or to participate in this conversation.