【问题标题】:Gulp-kss issuesGulp-kss 问题
【发布时间】:2016-07-22 16:15:01
【问题描述】:

我正在尝试让gulp-kss 处理我的项目,但是当我尝试运行我的任务时遇到了问题。我收到以下错误消息:

[12:07:28] Using gulpfile ~/Documents/Websites/company/project-uiapp/gulpfile.js
[12:07:28] Starting 'generate-sc'...
[12:07:28] Finished 'generate-sc' after 20 ms
fs.js:549
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
             ^

Error: ENOENT: no such file or directory, open '/Users/Josua/Documents/Websites/company/project-uiapp/node_modules/gulp-kss/node_modules/kss/lib/template/index.html'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Stream.endStream (/Users/Josua/Documents/Websites/company/project-uiapp/node_modules/gulp-kss/index.js:42:27)
at _end (/Users/Josua/Documents/Websites/company/project-uiapp/node_modules/through/index.js:65:9)
at Stream.stream.end (/Users/Josua/Documents/Websites/company/project-uiapp/node_modules/through/index.js:74:5)
at DestroyableTransform.onend (/Users/Josua/Documents/Websites/company/project-uiapp/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:523:10)
at DestroyableTransform.g (events.js:260:16)
at emitNone (events.js:72:20)
at DestroyableTransform.emit (events.js:166:7)
at /Users/Josua/Documents/Websites/company/project-uiapp/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:965:16
at doNTCallback0 (node.js:419:9)
at process._tickDomainCallback (node.js:389:13)

我将如何解决此错误?我一直在搜索 Google 和 Stackoverflow,但我还没有找到解决方案。我的解决方案基于此gulp-kss。我在下面包含了我的gulp 任务:

...
// Generate styleguide with templates
gulp.task('generate-sc', function() {

gulp.src(['build-less'])
.pipe(gulpkss({
    overview: __dirname + '/styles/styleguide.md'
}))
.pipe(gulp.dest('styleguide/'));

 // Concat and compile all your styles for correct rendering of the styleguide.
gulp.src('./src/less/styles.less')
.pipe(less())
.pipe(gulpconcat('styles/style.css'))
.pipe(gulp.dest('styleguide/'));
...

【问题讨论】:

    标签: gulp less gulp-less kss


    【解决方案1】:

    我终于找到了问题。我必须将kss 添加到我的package.json。我认为它会包含在gulp-kss 中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-28
      • 1970-01-01
      • 2015-10-27
      • 1970-01-01
      • 2023-03-11
      相关资源
      最近更新 更多