cssnext 不写文件
cssnext not write file
I 运行 cssnext (1.3.0) with gulp (3.8.11) on docker (1.6) container (official node image) and my OS是 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)
如果你有想法,我很感兴趣^^。
看起来这个模块的最新版本中有一个 issue。降级到 "gulp-cssnext": "0.6.0"
为我解决了这个问题。
或者你可以按照上面的问题!
I 运行 cssnext (1.3.0) with gulp (3.8.11) on docker (1.6) container (official node image) and my OS是 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)
如果你有想法,我很感兴趣^^。
看起来这个模块的最新版本中有一个 issue。降级到 "gulp-cssnext": "0.6.0"
为我解决了这个问题。
或者你可以按照上面的问题!