passy / autoprefixer-loader

Webpack loader for autoprefixer
MIT License
217 stars 25 forks source link

Unsupported previous source map format #25

Open lencioni opened 9 years ago

lencioni commented 9 years ago

I noticed the following error happen when running webpack.

ModuleBuildError: Module build failed: Error: Unsupported previous source map format: [object Object]
    at PreviousMap.loadMap (/var/lib/jenkins/node_modules/autoprefixer-loader/node_modules/postcss/lib/previous-map.js:86:23)
    at new PreviousMap (/var/lib/jenkins/node_modules/autoprefixer-loader/node_modules/postcss/lib/previous-map.js:31:25)
    at new Input (/var/lib/jenkins/node_modules/autoprefixer-loader/node_modules/postcss/lib/input.js:39:19)
    at Object.parse [as default] (/var/lib/jenkins/node_modules/autoprefixer-loader/node_modules/postcss/lib/parse.js:17:17)
    at new LazyResult (/var/lib/jenkins/node_modules/autoprefixer-loader/node_modules/postcss/lib/lazy-result.js:54:42)
    at Processor.process (/var/lib/jenkins/node_modules/autoprefixer-loader/node_modules/postcss/lib/processor.js:30:16)
    at Object.module.exports (/var/lib/jenkins/node_modules/autoprefixer-loader/index.js:51:45)
    at DependenciesBlock.onModuleBuildFailed (/var/lib/jenkins/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
    at nextLoader (/var/lib/jenkins/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
    at /var/lib/jenkins/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at runSyncOrAsync (/var/lib/jenkins/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:173:4)
    at nextLoader (/var/lib/jenkins/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /var/lib/jenkins/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at context.callback (/var/lib/jenkins/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at Object.onRender (/var/lib/jenkins/node_modules/sass-loader/index.js:184:9)
    at /var/lib/jenkins/node_modules/sass-loader/node_modules/async/lib/async.js:862:35
    at _arrayEach (/var/lib/jenkins/node_modules/sass-loader/node_modules/async/lib/async.js:85:13)
    at Object.<anonymous> (/var/lib/jenkins/node_modules/sass-loader/node_modules/async/lib/async.js:861:17)
    at Object.callback (/var/lib/jenkins/node_modules/sass-loader/node_modules/async/lib/async.js:44:16)
    at options.success (/var/lib/jenkins/node_modules/node-sass/lib/index.js:293:32)

The commit that caused it had the following style in it, which might be part of the problem (we are using sass-loader, style-loader, and css-loader as well):

:local(.ctaFooter) {

}

I'm not sure if this is the best place to report this, but I figured I'd start here in case you have any ideas.

Thanks for the loader!

anatoliyarkhipov commented 9 years ago

Have the same issue using with stylus-loader. In my case it was a problem with empty stylus files or files which has only functions, without any real CSS rules. I fixed this by adding an empty comment line to all of them.

App.styl

/* - */

functions.styl

/* - */

border-radius()
  -webkit-border-radius arguments
  -moz-border-radius arguments
  border-radius arguments
zachguo commented 9 years ago

@anatoliyarkhipov thx!

bdefore commented 9 years ago

@anatoliyarkhipov yes, thank you! it'd be nice if this could be fixed in autoprefixer.

bensonz commented 9 years ago

@anatoliyarkhipov solved it too. Thank you man This problem is so absurd.

watch-the-stars commented 9 years ago

Thanks for the hack :)