laravel-mix: Laravel Mix error with processCssUrls:true
- Laravel Mix Version: 0.11.4 (
npm list --depth=0) - Node Version (
node -v): 7.10.0 - NPM Version (
npm -v): 4.5.0 - OS: Homestead on Vagrant with VBox on Windows 10
Description:
I am having an error when I try to run npm run dev with processCssUrls set to true (default). I keep getting:
error in ./resources/assets/less/admin/images/error-bg.jpg
Module build failed: Error: spawn /home/vagrant/Code/kin-ball-v4/node_modules/mozjpeg/vendor/cjpeg ENOENT
at exports._errnoException (util.js:1050:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
@ ./~/css-loader?{"url":true,"sourceMap":false}!./~/postcss-loader?{"sourceMap":false}!./~/less-loader?{}!./resources/assets/less/admin/style.less 5:80838-80870
@ ./resources/assets/less/admin/style.less
@ multi ./~/laravel-mix/src/mock-entry.js ./resources/assets/less/admin/style.less
Module build failed: Error: spawn /home/vagrant/Code/kin-ball-v4/node_modules/optipng-bin/vendor/optipng ENOENT
at exports._errnoException (util.js:1050:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
@ ./~/css-loader?{"url":true,"sourceMap":false}!./~/postcss-loader?{"sourceMap":false}!./~/less-loader?{}!./resources/assets/less/admin/style.less 5:106624-106660
@ ./resources/assets/less/admin/style.less
@ multi ./~/laravel-mix/src/mock-entry.js ./resources/assets/less/admin/style.less
I tried disabling it and it was able to build just fine… I am compiling less files btw.
Steps To Reproduce:
I am not sure, I followed the installation process… I am not sure what I am doing wrong…
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (3 by maintainers)
Seems like img-loader is causing these issues, there is a way to disable image minifications without disabling url processing in css. Check this commit
Can you try above config until someone fix this issue.
I am using ubuntu 16.04 and I solved the issue by
sudo apt-get install autoconfsudo apt-get install dh-autoreconfnpm rebuild mozjpegto fix this, I ran:
solved the issue for me (ubuntu 16.04)