Running "cssmin:minify" (cssmin) task
[BS] File changed: ../css/app.prefixed.css
>> TypeError: Cannot read property '1' of null
Warning: CSS minification failed Use --force to continue.

If you’re new to grunt and/or Sass, this error can seem mystifying, but we’re actually given enough information to troubleshoot it. First, note that it occurred in the cssmin:minify task. The scss is compiling but minify doesn’t like something. The Sass compiler is more forgiving than the minifier.

Unlike your usual sass errors, minification will not display the sass file in question ( since its only processing the compiled CSS file) nor the line number.

The quickest way to identify the source of the problem is to comment out your individual sass files and compile to see if the error pops up. In my case, I found out it was in my _ HelveticaNeue.scss file. A quick scan revealed I had a @font-face inside another @fontface tag.

If you’re truly stuck, try running your code through CSSlint, there’s even an online csslinter. Pay special attention to the parsing errors. Unexpected Braces will cause minify to fail. Locate and correct the errors and save. You should now be compiling sass error-free.