Laravel Mix problem - Can not combine Scripts & Styles
TLDR: I am trying to combine my Scripts and Styles using Mix. However i keep running into an error when I 'npm run dev' and 'npm run prod' .
The error:
SyntaxError: missing ) after argument list
at new Script (vm.js:83:7)
at NativeCompileCache._moduleCompile (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/var/www/eurotripr.com/node_modules/laravel-mix/setup/webpack.config.js:12:1)
at Module._compile (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (/var/www/eurotripr.com/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at WEBPACK_OPTIONS (/var/www/eurotripr.com/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
at requireConfig (/var/www/eurotripr.com/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
at /var/www/eurotripr.com/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
at Array.forEach (<anonymous>)
at module.exports (/var/www/eurotripr.com/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
at yargs.parse (/var/www/eurotripr.com/node_modules/webpack-cli/bin/cli.js:71:45)
at Object.parse (/var/www/eurotripr.com/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
at /var/www/eurotripr.com/node_modules/webpack-cli/bin/cli.js:49:8
at Object.<anonymous> (/var/www/eurotripr.com/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/var/www/eurotripr.com/node_modules/webpack/bin/webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/craig/.npm/_logs/2020-05-20T05_33_23_069Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/craig/.npm/_logs/2020-05-20T05_33_23_079Z-debug.log
I have a LARGE number of scripts (18) and stylesheets (8) and am bogging my new site down with HTTP requests. I'm running CentOS and can not use HTTP/2 without compiling latest apache from source which i don't want to do due to inexperience. I have tried using 'combine(0' instead of 'scripts()'. I have tried the following from @JeffreyWay on one of Mix's github issues but it did not solve the issue:
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
I have tried reducing the number of scripts and styles i am combining to 2, tried only combining scripts, only combining styles. I have reviewed the logs per the errors above, but nothing clearly explains to me what the actual error is nor how to resolve.
I am running CentOS 7, Apache 2.4.6, Laravel 6, 18.13, mix 6.14.4
Any thoughts as to what i could be doing wrong?
Please or to participate in this conversation.