sindresorhus / gulp-autoprefixer

Prefix CSS
MIT License
692 stars 50 forks source link

@supports (-ms-ime-align:auto) #85

Closed maapteh closed 7 years ago

maapteh commented 7 years ago

Hi, i don't know when this issue really arised (older project, i would say some months) but when cleaning all dependencies and starting from scratch the gulp-autoprefixer 'gulp-autoprefixer@^4.0.0' chokes on:

@supports (-ms-ime-align:auto) {
   ...
}

Which is used in some of our sass files to target IE EDGE. While it didn't choke before and normally builded it.

After debugging it turns out that the actual dependency 'autoprefixer@6.7.7' gave the following error:

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:1146:7)
    at eachParent (/usr/local/lib/node_modules/autoprefixer/node_modules/browserslist/index.js:65:18)
    at getStat (/usr/local/lib/node_modules/autoprefixer/node_modules/browserslist/index.js:79:12)
    at browserslist (/usr/local/lib/node_modules/autoprefixer/node_modules/browserslist/index.js:188:15)
    at Browsers.parse (/usr/local/lib/node_modules/autoprefixer/lib/browsers.js:61:16)
    at new Browsers (/usr/local/lib/node_modules/autoprefixer/lib/browsers.js:52:30)
    at Supports.prefixer (/usr/local/lib/node_modules/autoprefixer/lib/supports.js:48:24)
    at Supports.prefixed (/usr/local/lib/node_modules/autoprefixer/lib/supports.js:93:29)
    at /usr/local/lib/node_modules/autoprefixer/lib/supports.js:316:39

Besides going back a version of gulp-autoprefixer is there something we can do differently (without taking out the specific code part :))? Thanks!

kevva commented 7 years ago

Seems like it's an issue with browserslist: https://github.com/ai/browserslist/issues/158.