Open sergeynilov opened 5 years ago
I tried to import vuecsv in my *.vue file and after installing of vuecsv.min.js I have /node_modules/vuecsv/dist/vuecsv.min.js file and in my vue file I tried to make like :
<script>
import {bus} from '../../../../app';
import appMixin from '../../../../appMixin';
//import
import VueCSV from '/vuecsv/dist/vuecsv.min.js'; // /node_modules/vuecsv/dist/vuecsv.min.js
Vue.use(VueCSV);
Vue.component("csv-download" , VueCSV.CsvDownload )
but in console I see error :
ERROR in ./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js&)
Module not found: Error: Can't resolve '/vuecsv/dist/vuecsv.min.js' in '/mnt/_work_sdb8/wwwroot/lar/wiznext/msg-laravel-application/resources/js/components/Horizontal/personal/userLists'
@ ./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js&) 124:0-48 127:8-14 132:30-36
@ ./resources/js/components/Horizontal/personal/userLists/list.vue?vue&type=script&lang=js&
@ ./resources/js/components/Horizontal/personal/userLists/list.vue
@ ./resources/js/routes.js
@ ./resources/js/app.js
@ multi ./resources/js/app.js ./resources/sass/Horizontal/app.scss ./resources/sass/Horizontal/style_lg.scss ./resources/sass/Horizontal/style_md.scss ./resources/sass/Horizontal/style_sm.scss ./resources/sass/Horizontal/style_xs_320.scss ./resources/sass/Horizontal/style_xs_480.scss ./resources/sass/Horizontal/style_xs_600.scss
If i modify import line as :
import VueCSV from 'vuecsv'; // /node_modules/vuecsv/dist/vuecsv.min.js
I see error in npm console :
This dependency was not found:
* Vue in ./node_modules/vuecsv/dist/vuecsv.min.js
To install it, you can run: npm install --save Vue
sure I have vue installed.
Which way is right?
Hello, in my laravel 5.8 / vuejs 2.5 app I need to upload csv file and I found this https://github.com/ynishi/vuecsv plugin and tried to install it. But installing it I got errors in JS console:
The output above was somewhat unuaual, but was it just advirtisement? Next I run :
After that package.json :
I tried to use this https://jsfiddle.net/ynishif/1ztu8x8q/ fiddle, But I Got error referenced at my file :
I am very confused as VueCSV is not defined anywhere, but it works if mentioned fiddle. That seems somewhat tricky for me, as looks like I try to attach VueCSV with reference to its method and I do not see how it works in the fiddle above?
What did I miss?
Thanks!