Monday, 10 April 2017

gulp-cssmin TypeError cannot read property '0' of null

I'm trying to minify my code . but t have this issue

D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\selectors\extractor.js:66
  return name.replace(/^\-\w+\-/, '').match(/([a-zA-Z]+)/)[0].toLowerCase();
                                                          ^

TypeError: Cannot read property '0' of null
    at findNameRoot (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\selectors\extractor.js:66:59)
    at extract (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\selectors\extractor.js:36:9)
    at restructure (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\selectors\restructure.js:297:22)
    at optimize (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\selectors\advanced.js:71:5)
    at minify (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\clean.js:228:5)
    at whenSourceMapReady (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\clean.js:135:7)
    at Object.whenDone (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\clean.js:155:14)
    at processNext (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\imports\inliner.js:105:13)
    at importFrom (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\imports\inliner.js:79:10)
    at processNext (D:\gulp-compiler\node_modules\gulp-cssmin\node_modules\clean-css\lib\imports\inliner.js:104:16)

i try search for my issue but no new my gulp js is // copy css and minify from development to deployment

gulp.task("compress-css", () => {
  return gulp.src( pathGo+"css/**/*.css")
   .pipe(cssmin().on('error',function(e){
        console.log(e)
  })) 
  .pipe(gulp.dest('testing_folder/css1'));;
});

notice i used proxy



via Elbazz

No comments:

Post a Comment