gulp-fontcustom icon indicating copy to clipboard operation
gulp-fontcustom copied to clipboard

Weird ENOENT error

Open notpushkin opened this issue 10 years ago • 6 comments

~/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 avatar Apr 14 '15 19:04 notpushkin

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.

notpushkin avatar Apr 14 '15 19:04 notpushkin

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

pushred avatar Jun 26 '15 20:06 pushred

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.

mr-mig avatar Jul 22 '15 10:07 mr-mig

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

johanbrook avatar Feb 08 '16 13:02 johanbrook

Can you update npm package with fix?

kikar avatar Aug 15 '16 11:08 kikar

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

johanbrook avatar Aug 16 '16 07:08 johanbrook