johanbrook / gulp-fontcustom

A gulp plugin that convert SVG files to font icons with Fontcustom
15 stars 4 forks source link

Weird ENOENT error #4

Open notpushkin opened 9 years ago

notpushkin commented 9 years ago
~/SomeProject/app $ gulp icons    
[gulp] Using gulpfile ~/SomeProject/app/gulpfile.js
[gulp] Starting 'icons'...

/home/ale/SomeProject/app/node_modules/gulp-fontcustom/node_modules/child-process-promise/node_modules/q/q.js:126
                    throw e;
                          ^
Error: Can't list "./___tmp___": ENOENT, readdir './___tmp___'

Config looks like so (nothing unusual here):

var gulp = require('gulp'),
    fontcustom = require('gulp-fontcustom');

gulp.task('icons', function() {
  return gulp.src("src/icons/*.svg")
    .pipe(fontcustom({
      font_name: 'MaterialIcons'
    }))
    .pipe(gulp.dest("www/icons/"));
});

What could have gone wrong?

notpushkin commented 9 years ago

Looks like deleting .fontcustom-manifest.json helped around this. The file probably was corrupted in some way.

It still would be better to pass any error output from fontcustom, since it would have given a hint:

error  Couldn't parse `.fontcustom-manifest.json`. Fix any invalid JSON or delete the file to start from scratch.
pushred commented 9 years ago

Same here, but I don't have a .fontcustom-manifest.json file to delete.

mr-mig commented 9 years ago

The problem is that there is no error output from exec, from fontcustom process run.

UPD: so, I've debugged that stuff and figured out that it is fontcustom binary that swallow errors. So, there is no straightforward way to fix it in this plugin. If you face some issue I'd propose to run the command, generated in plugin, directly and see the output.

johanbrook commented 8 years ago

I've merged #8 to master, feel free to pull down and verify.

kikar commented 8 years ago

Can you update npm package with fix?

johanbrook commented 8 years ago

@kikar Done! https://www.npmjs.com/package/gulp-fontcustom