What is your Laravel Mix version?
Feb 27, 2021
5
Level 9
Laravel Mix error on VueJS compiling
Hello, I cannot make VueJS to work in my Laravel 8 application.
These are the commands I ran, according to the documentation:
composer require laravel/ui
php artisan ui vue
npm install
npm run dev
This is the output I get. Any thoughts? Could not find anything relevant on my searches.
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js
/var/www/pmdb/node_modules/webpack-cli/bin/cli.js:93
throw err;
^
AssertionError [ERR_ASSERTION]: mix.js() is missing required parameter 1: entry
at Function.js (/var/www/pmdb/node_modules/laravel-mix/src/Assert.js:13:9)
at JavaScript.register (/var/www/pmdb/node_modules/laravel-mix/src/components/JavaScript.js:40:16)
at Api.mix.<computed> [as vue] (/var/www/pmdb/node_modules/laravel-mix/src/components/ComponentFactory.js:98:53)
at Object.<anonymous> (/var/www/pmdb/webpack.mix.js:15:6)
at Module._compile (/var/www/pmdb/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (/var/www/pmdb/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/var/www/pmdb/node_modules/laravel-mix/setup/webpack.config.js:12:1)
at Module._compile (/var/www/pmdb/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (/var/www/pmdb/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at WEBPACK_OPTIONS (/var/www/pmdb/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
at requireConfig (/var/www/pmdb/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
at /var/www/pmdb/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
at Array.forEach (<anonymous>)
at module.exports (/var/www/pmdb/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
at /var/www/pmdb/node_modules/webpack-cli/bin/cli.js:71:45
at Object.parse (/var/www/pmdb/node_modules/webpack-cli/node_modules/yargs/yargs.js:576:18)
at /var/www/pmdb/node_modules/webpack-cli/bin/cli.js:49:8
at Object.<anonymous> (/var/www/pmdb/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/var/www/pmdb/node_modules/webpack/bin/webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
Please or to participate in this conversation.