laravel-mix: v 0.8.7 - mix.sass().options() - Module build failed: Error "...scss" is not in the SourceMap
- Laravel Mix Version: 0.8.7
- Node Version: 6.9.5
- NPM Version: 4.2.0
- OS: Windows 7
Description:
Updated to mix version 0.8.7 and getting the following error on
mix.sass('resources/assets/sass/app.scss', 'public/css').options({ processCssUrls: false }).version();
error in ./resources/assets/sass/app.scss
Module build failed: Error: “…/…/resources/assets/sass/_fonts.scss” is not in the SourceMap. at SourceMapConsumer_sourceContentFor [as sourceContentFor] (C:.…\node_modules\source-map\lib\source-map-consumer.js:704:13) at SourceMapGenerator.<anonymous> (C:.…\node_modules\source-map\lib\source-map-generator.js:235:40) at Array.forEach (native) at SourceMapGenerator_applySourceMap [as applySourceMap] (C:\VM-homestead\Code\laravel\node_modules\source-map\lib\source-map-generator.js:234:32) at MapGenerator.applyPrevMaps (C:.…\node_modules\postcss\lib\map-generator.js:146:22) at MapGenerator.generateMap (C:.…\node_modules\postcss\lib\map-generator.js:194:46) at MapGenerator.generate (C:.…\node_modules\postcss\lib\map-generator.js:297:25) at LazyResult.stringify (C:.…\node_modules\postcss\lib\lazy-result.js:294:24) at C:.…\node_modules\postcss\lib\lazy-result.js:231:27
@ ./resources/assets/sass/app.scss 4:14-183 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
error in ./resources/assets/sass/app.scss
When removing the options part everything works as expected. Tested on a fresh laravel project and getting the same error with mix..options({ processCssUrls: false })`
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17
Same, when I set to
mix.options({ processCssUrls: false });Then the error appear.
But after I add below to package.json it SOLVED.
"resolve-url-loader": "^2.0.0", "sass-loader": "^6.0.0",Looks like we needed to bump sass-loader and resolve-url-loader dependencies to fix this. I’ve pushed and tagged it.
2cb8714a7a765346d6967c7c803bb92440c4fbdf
@coder77 save my day! Thanks!
@coder77 Thank youuu!!! It worked!
Tested it with a fresh installation of Laravel, also returns this error.
node -vv7.7.1npm -v4.1.2Create fresh Laravel installation
composer create-project --prefer-dist laravel/laravel mix-testInstall node modules
npm installRun
npm run devNo errors
Disable processCssUrls
mix.options({ processCssUrls: false });Returns error: