patorjk/figlet.js

No File or Directory

Closed this issue · 2 comments

Everything runs fine on MacOSX, but i moved my project to run a on Cent OS, and now I get this error. The rest of my project runs fine as well.

node server.js

{ Error: ENOENT: no such file or directory, open '/home/mitsuha/node_modules/figlet/lib/../fonts/colossal.flf'
    at Error (native)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/mitsuha/node_modules/figlet/lib/../fonts/colossal.flf' }

I can confirm the font exist, but not in that directory. They are in node_modules/figlet/fonts

Here is my code...

const figlet = require('figlet');

figlet('Mitsuha', {
            font: 'colossal',
        },
        (err, data) => {
            if (err) return console.log(err);
            console.log(data);
        });

Just tried it out on CentOS and had the same issue, however, I was able to resolve it by using the name "Colossal". It looks like it may be a casing issue. Let me know if it resolves it for you, I'll look into see about putting something in so case doesn't matter regardless of OS.

great, that worked. Thanks!