giviz's avatar
Level 3

Installing an NPM VueJs Component ?

Hi guys,

Is there a tutorial somewhere on how to install and configure a vuejs component using Npm in Laravel ?

For exemple that component :

https://github.com/vue-bulma/datepicker

I've run

npm install vue-style-loader --save-dev

And tried to reference it like this in app.js :

Vue.component('datepicker', require('vue-bulma-datepicker'));

And also

Vue.component('datepicker', require('../../../node_modules/vue-bulma-datepicker/src/index.vue'));

But I have that error :

* !!vue-style-loader!css-loader!../../vue-loader/lib/style-rewriter?id=data-v-7470c924!stylus-loader!../../vue-loader/lib/selector?type=styles&index=0!./index.vue in ./~/vue-bulma-datepicker/src/index.vue

Obviously I'm missing something, any idea what ?

Thanks !

0 likes
1 reply
giviz's avatar
giviz
OP
Best Answer
Level 3
npm install stylus --save
npm install stylus-loader --save
npm install css-loader --save
npm install vue-style-loader --save

Solved the issue

1 like

Please or to participate in this conversation.