There should be a MIx category to "Pick a Channel" here in the forum, no? Anyway that's beside the point...
Upgraded Laravel 5.3 to 5.4 in less than an hour. Then began with the Elixir to Mix transition and it was nothing but a nightmare. Spent 4 hours already with what should be a trivial task! I'm exhausted and ready to give up!
First: I use UIkit and have a copy of UIkit (that I tweaked) in resources/assets/uikit.
mix.js([ // will become all.js
'resources/assets/js/app.js',
'resources/assets/uikit/js/uikit.js',
'resources/assets/uikit/js/components/grid.js'
], 'public/js/all.js')
I got an error when running npm run dev that UIKIT is missing and not in the node_modules folder! What? Why is it all of sudden looking there? Yes, grid.js uses UIkit as a dependency, but doesn't care about node_modules or where it is.
I couldn't get it to work and had to move a copy of uikit.js to node_modules which makes no sense to have it twice now.
At least I managed to get it to work, but the thing that is killing me now is that I can't compile a simple scss file! Just can't get it to work even if the scss is empty.
mix.js('resources/assets/js/app.js', 'public/js/all.js')
.sass('resources/assets/sass/test.scss', 'public/css/main.css');
And then I get:
ERROR Failed to compile with 3 errors
error in ./resources/assets/sass/test.scss
Module build failed: Error: ENOENT: no such file or directory, scandir 'G:\Dropbox\PhpStorm Projects\elasticstage\node_modules\node-sass\vendor'
at Error (native)
I don't have a vendor directory in node-sass!
error
G:\Dropbox\PhpStorm Projects\elasticstage\node_modules\extract-text-webpack-plugin\loader.js?{"id":1,"omit":1,"remove":true}!G:\Dropbox\PhpStorm Projects\elast
icstage\node_modules\style-loader\index.js!G:\Dropbox\PhpStorm Projects\elasticstage\node_modules\css-loader\index.js!G:\Dropbox\PhpStorm Projects\elasticstage
\node_modules\postcss-loader\index.js!G:\Dropbox\PhpStorm Projects\elasticstage\node_modules\resolve-url-loader\index.js!G:\Dropbox\PhpStorm Projects\elasticst
age\node_modules\sass-loader\index.js?sourceMap&precision=8!G:\Dropbox\PhpStorm Projects\elasticstage\resources\assets\sass\test.scss doesn't export content
...
Asset Size Chunks Chunk Names
/js/all.js 1.49 MB 0 [emitted] [big] /js/all
mix-manifest.json 32 bytes [emitted]
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Steve Rhodes\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.9.4
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! @ dev: `node node_modules/cross-env/bin/cross-env.js 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 2
npm ERR!
No idea what that could even mean...
And then there is this lovely error message notification in the bottom right corner. I'm really missing the simple to read Elixir errors!
Laravel Mix
Error: !!./../../../node_modules/css-
loader/index.js!./../../../node_modules/
postcss-loader/index.js!./../../../
node_modules/resolve-url-loader/inde
toast
what the hell?? :)