我在docker (1.6)容器(官方节点映像)上运行cssnext (1.3.0),而我的操作系统是ArchLinux (主机)。节点版本为0.10.38。我有个问题,我解决不了。这是我的gulpfile.js:
var gulp = require('gulp');
var cssnext = require("gulp-cssnext");
gulp.task("css4Tocss", function() {
gulp.src("css/index.css")
.pipe(cssnext({
compress: true
}))
.pipe(gulp.dest("dist"))
});当我跑步时:
gulp css4Tocss我得到以下错误:
events.js:72
throw er; // Unhandled 'error' event
^
TypeError: undefined is not a function
at LazyResult.run (/app/node_modules/cssnext/node_modules/postcss/lib/lazy-result.js:193:24)
at LazyResult.sync (/app/node_modules/cssnext/node_modules/postcss/lib/lazy-result.js:179:32)
at LazyResult.stringify (/app/node_modules/cssnext/node_modules/postcss/lib/lazy-result.js:210:14)
at LazyResult._createClass.get (/app/node_modules/cssnext/node_modules/postcss/lib/lazy-result.js:232:25)
at cssnext (/app/node_modules/cssnext/index.js:220:20)如果你有主意的话,我对^^感兴趣。
发布于 2015-05-27 20:03:29
看起来这个模块的最新版本中有一个问题。降级到"gulp-cssnext": "0.6.0"帮我解决了这个问题。
要么这样,要么你可以跟进上面的问题!
https://stackoverflow.com/questions/30491882
复制相似问题