PhilJ / gulp-kss

Gulp plugin for KSS (Knyle Style Sheets) documentation generation
50 stars 34 forks source link

Error: ENOENT, no such file or directory #2

Closed Anenth closed 7 years ago

Anenth commented 10 years ago

I am facing following error when running gulp-kss. its working perfectly in node-kss

Console Error

fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/root/node_modules/gulp-kss/node_modules/kss/lib/template/index.html'

gulp configuration file

gulp.task('styleguide', function(){
  return gulp.src([path.styles.src])
      .pipe($.kss({
          overview: 'app/assets/src/stylesheets/styleguide.md'
      }))
      .pipe(gulp.dest('styleguide/'));
});
willpracht commented 9 years ago

I believe this means you need a template file.

This might help: Stack Overflow: Setting Up Knyle StyleSheets and/or KSS Node

ImanimalXI commented 9 years ago

I had the same error and resolved this issue by using the Absolute path to template directory.

 var themeFolder = __dirname + '/less/';
 var templateFolder = __dirname + '/styleguide_templates/';

gulp.src([themeFolder + '**/*.less'])
        .pipe(gulpkss({
            overview: themeFolder + 'styleguide.md', //Absolute path to markdown file which is used for styleguide home page
            templateDirectory: templateFolder //Absolute path to template directory, by default kss-node default template is used.
        }))
        .pipe(gulp.dest( themeFolder + 'styleguide/'));
sarahdayan commented 7 years ago

I know this is an old issue but I faced it as well and sorted it out by manually installing kss as well.

npm install --save-dev kss

Somehow kss wasn't in the node_modules of the gulp-kss plugin. Weird...