When I am trying to load the page in the browser, I do not see the component and I get the following error
VM2926:2643 [Vue warn]: Failed to mount component: template or render function not defined.
(found in component at ...../resources/assets/js/test/components/Example.vue)
More info on the problem
The problem rise up when I removed the node_modules folder from my project root and try to re-built it using the same package.json file via yarn install
Before this, I was able to built and load the Example vue component successfully
I was able to solve the problem by following the advice in https://github.com/laravel/elixir/issues/668
I was falsely calling the elixir() function in my gulpfile more than once, which ultimately caused the error
The situation:
I am trying to built and load a .vue module using
laravel-elixir 6
andlaravel-elixir-vue-2 loader
Bellow I present the setup I used:
My
package.json
The list of installed vue-related packages:
yarn ls | grep vue
My entry point
app.js
My component Example.vue
In my gulpfile.js
The gulp task completes without errors
The problem
When I am trying to load the page in the browser, I do not see the component and I get the following error
More info on the problem
The problem rise up when I removed the
node_modules
folder from my project root and try to re-built it using the samepackage.json
file viayarn install
Before this, I was able to built and load the Example vue component successfully