OneWayTech / vue2-datatable

(DEPRECATED) The best Datatable for Vue.js 2.x which never sucks. Give us a star 🌟 if you like it!
MIT License
882 stars 230 forks source link

Installation Issue #1

Closed wke102 closed 7 years ago

wke102 commented 7 years ago

How can i require them in my app.js file?

Can't seem to require this component, doesn't seem to have Datatable.vue main file component?

kenberkeley commented 7 years ago

see https://github.com/OneWayTech/vue2-datatable/blob/master/package.json#L6

kenberkeley commented 7 years ago
import Datatable from 'vue2-datatable-component'
// as same as
import Datatable from 'vue2-datatable-component/lib/index.vue'
wke102 commented 7 years ago

Am still having problems here tried import and require but still getting errors...

Any idea how to fix this?

[23:50:50] Using gulpfile /Applications/MAMP/htdocs/laravel5/gulpfile.js [23:50:50] Starting 'all'... [23:50:50] Starting 'sass'... [23:50:51] Finished 'sass' after 390 ms [23:50:51] Starting 'webpack'... { [Error: ./~/buble-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./~/vue2-datatable-component/lib/index.vue Module not found: Error: Can't resolve './HeadSort' in '/Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib' resolve './HeadSort' in '/Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib' using description file: /Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/package.json (relative path: ./lib) Field 'browser' doesn't contain a valid alias configuration after using description file: /Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/package.json (relative path: ./lib) using description file: /Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/package.json (relative path: ./lib/HeadSort) as directory /Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib/HeadSort doesn't exist no extension Field 'browser' doesn't contain a valid alias configuration /Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib/HeadSort doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib/HeadSort.js doesn't exist .json Field 'browser' doesn't contain a valid alias configuration /Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib/HeadSort.json doesn't exist [/Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib/HeadSort] [/Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib/HeadSort] [/Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib/HeadSort.js] [/Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib/HeadSort.json] @ ./~/buble-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./~/vue2-datatable-component/lib/index.vue 101:0-33 @ ./~/vue2-datatable-component/lib/index.vue @ ./resources/assets/js/app.js./~/buble-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./~/vue2-datatable-component/lib/index.vue Module not found: Error: Can't resolve './LimitSelect' in '/Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib' resolve './LimitSelect' in '/Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/lib' using description file: /Applications/MAMP/htdocs/laravel5/node_modules/vue2-datatable-component/package.json (relative path: ./lib) Field 'browser' doesn't contain a valid alias configuration

kenberkeley commented 7 years ago

If you are using Webpack 1.x, you'd better indicate resolve.extensions