protonemedia / inertiajs-tables-laravel-query-builder

Inertia.js Tables for Laravel Query Builder
https://protone.media/en/blog/introducing-inertiajs-tables-a-datatables-like-package-for-laravel-query-builder
MIT License
437 stars 130 forks source link

Cannot use import statement outside a module #32

Open MrFallen opened 3 years ago

MrFallen commented 3 years ago

Is this package does not work with Inertia JS?

E:\Projects\dymlab>node public/js/ssr.js
Starting SSR server...
Server started.
E:\Projects\dymlab\node_modules\@protonemedia\inertiajs-tables-laravel-query-builder\js\index.js:1
import iwqb from './InteractsWithQueryBuilder.vue';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1054:16)
    at Module._compile (internal/modules/cjs/loader.js:1102:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.@protonemedia/inertiajs-tables-laravel-query-builder (E:\Projects\dymlab\public\js\ssr.js:13219:18)
    at __webpack_require__ (E:\Projects\dymlab\public\js\ssr.js:13287:41)
    at Object../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/Pages/Dashboard.vue?vue&type=script&lang=js (E:\Projects\dymlab\public\js\ssr.js:1466:110)
ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization
    at Module.default (E:\Projects\dymlab\public\js\ssr.js:11202:42)
    at E:\Projects\dymlab\node_modules\@inertiajs\inertia-vue3\dist\index.js:1:9011
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization
    at Module.default (E:\Projects\dymlab\public\js\ssr.js:11202:42)
    at E:\Projects\dymlab\node_modules\@inertiajs\inertia-vue3\dist\index.js:1:9011
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
pascalbaljet commented 3 years ago

What's inside ssr.js? How can I replicate this error?

John94php commented 2 years ago

if you're using

try to use