sindresorhus / gulp-autoprefixer

Prefix CSS
MIT License
694 stars 50 forks source link

Error in gulp after updating to 4.0.0 #82

Closed nkaliev closed 7 years ago

nkaliev commented 7 years ago

After updating to 4.0.0 from 3.1.1 got this error:

      throw er; // Unhandled 'error' event
      ^
TypeError: this is not a typed array.
    at Function.from (native)
    at <censored>/node_modules/gulp-autoprefixer/index.js:25:27
    at process._tickCallback (node.js:368:9)

My task (fine with 3.1.1):

    gulp.src('./scss/**/*.scss')
        .pipe(gulpif(PRODUCTION, compass({
            style: 'compressed',
            sourcemap: false,
            css: "./css",
            sass: "./scss",
            image: "./images",
            font: "./fonts"
        }), compass({
            sourcemap: true,
            css: "./css",
            sass: "./scss",
            image: "./images",
            font: "./fonts"
        })))
        .on('error', function(error) {
            console.log(error);
        })
        .pipe(gulpif(PRODUCTION, prefixer({
            browsers: ['last 5 versions']
        })))
        .pipe(gulpif(PRODUCTION, csso()))
        .pipe(gulpif(PRODUCTION, gulp.dest('./css')))
        .pipe(gulpif(!PRODUCTION, browserSync.stream()));
});

My devDependencies:

"devDependencies": {
    "browser-sync": "^2.18.8",
    "gulp": "^3.9.1",
    "gulp-autoprefixer": "^4.0.0",
    "gulp-compass": "^2.1.0",
    "gulp-csso": "^3.0.0",
    "gulp-if": "^2.0.2",
    "gulp-uglify": "^2.1.2",
    "yargs": "^8.0.1"
  }

I don't really think that issue comes from autoprefixer itself

stevenbriscoeca commented 7 years ago

https://github.com/sindresorhus/gulp-autoprefixer/issues/81

sindresorhus commented 7 years ago

Duplicate of https://github.com/sindresorhus/gulp-autoprefixer/issues/81.