I'm seeing the following error when calling mix.sass() from Git Bash Shell on Windows after upgrading from Laravel Mix 0.12.1 -> 1.1.0
Webpack CMD
node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development webpack --config=node_modules/laravel-mix/setup/webpack.config.js --progress --hide-modules
Error Output
95% emitting ERROR Failed to compile with 1 errors13:13:06
This dependency was not found:
* E:\Code\project\resources\assets\sass\home.scss in multi ./node_modules/laravel-mix/src/builder/mock-entry.js ./resources/assets/sass/home.scss
To install it, you can run: npm install --save E:\Code\project\resources\assets\sass\home.scss
webpack.mix.js
mix.sass('resources/assets/sass/home.scss', 'dist/home/index.css')
.options({ processCssUrls: false })
.version();
pwd in the shell is something more unix-like: /e/Code/project/E:\Code\project\mix.sass(path.resolve('resources/assets/sass/home.scss'), 'dist/home/index.css')mix.sass calls, mix.js calls resolve fine (maybe a sass-loader issue?)dependency was not found or dependencies were not found depending on the number of times mix.sass() is called (included for posterity)Update
Full
npm ls --depth=0 Click to Expand
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] extraneous
├── [email protected]
├── [email protected]
├── [email protected] invalid (git://github.com/webpack-contrib/extract-text-webpack-plugin.git#29e1b4cae66b3b618713db726e3d94b25f260a56)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] invalid (github:jeroennoten/webpack-stream#d78a3568e259f9cdbc64c60290639af6ef6d3baf)
└── [email protected]
Can you break this down to a small reproducible setup that I can try out?
Welp, issue cleared up while hunting down conflicting package / trying to create a reproducible setup.
I think it may have been related to an old, unused postcss-flexibility dep?
not exactly sure, because re-installing that doesn't break anything...
Anyway, I deleted that and a few other unused packages, then nuked node_modules and reinstalled.
Here's the diff in case anyone stumbles into this in the future: https://cl.ly/1B2m1V1J120N
Sorry to bother you-- thanks for the continued great tools & quick support as always. you're the best!
I'm still seeing this.
Laravel Mix Version: 1.2.0
Node Version: 8.1.3
NPM Version 5.120
OS: macOS 10.12.5
This dependency was not found:
* /Users/mediabeastnz/Sites/site.com/resources/assets/sass/app.scss in multi ./node_modules/laravel-mix/src/builder/mock-entry.js ./resources/assets/sass/app.scss
To install it, you can run: npm install --save /Users/mediabeastnz/Sites/site.com/resources/assets/sass/app.scss
Asset Size Chunks Chunk Names
mix.js 626 bytes 0 [emitted] mix
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ production: `cross-env NODE_ENV=production 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!
npm ERR! Failed at the @ production 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! /Users/mediabeastnz/.npm/_logs/2017-07-12T09_56_11_861Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ prod: `npm run production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I am seeing the same issue. Tried the usual wipe of node_modules and a fresh npm install (as well as several other things) but I can't figure it out. From what I can tell so far, mix.copy() and mix.scripts() are working but mix.sass() and mix.js() are throwing the same error as @mediabeastnz
Node Version: 6.11.0
NPM Version: 5.2.0
@mediabeastnz if you are still experiencing issues I finally got this to work. It seems like the package-lock.json file was giving me issues:
The steps I took to finally fix it were:
rm -r node_modules/
rm package-lock.json
npm cache clean -f
npm install
^ Ah yes, rm'ing package-lock and forcing npm cache clean is something I had to do as well.
Most helpful comment
@mediabeastnz if you are still experiencing issues I finally got this to work. It seems like the package-lock.json file was giving me issues:
The steps I took to finally fix it were:
rm -r node_modules/
rm package-lock.json
npm cache clean -f
npm install