我在docker(1.6)容器(官方节点映像)上使用gulp(3.8.11)运行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)
如果您有任何想法,我对^^感兴趣。