figlet.js: Unknown error
Im getting an “UNKNOWN” errorno -4094 Code:
figlet("Test", function(err, data) {
if (err) {
console.log(err);
return;
}
message.channel.send('```' + data + '```')
})```
Error:
`{ [Error: UNKNOWN: unknown error, open '//../fonts/Standard.flf']
errno: -4094,
code: 'UNKNOWN',
syscall: 'open',
path: '//../fonts/Standard.flf' }
`
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 15 (6 by maintainers)
Wait, is this being transpiled? If so, it probably is a Webpack config error of some sort, or at least a problem how the code is being transpiled. __dirname should resolve to “your-app/node_modules/figlet/lib/”, and it’s joined with “…/fonts”, which gives the directory to the fonts folder.
Another option may be to use the new “importable-fonts” that I added to the project. I haven’t yet tested these, which is why it’s not advertised. However, I’m adding them for use in front-end apps that get transpiled. The fonts are actually there, and I envision them being used like this:
Though again, I haven’t tested these yet due to some computer issues I’m having.