question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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' }
`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
patorjkcommented, May 26, 2019

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:

import standard from 'figlet/importable-fonts/Standard.js'
figlet.parseFont('Standard', standard);
figlet.text('test', {
    font: 'Standard',
}, function(err, data) {
    console.log(data);
});

Though again, I haven’t tested these yet due to some computer issues I’m having.

0reactions
REAZNcommented, Jun 27, 2019

@cyberbobjr I have a hacky fix for it, Just delete all the fonts and importable-fonts you don’t use and it should fix the indexing. https://github.com/REAZN/figlet.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS update and restore errors - Apple Support (SA)
If your device couldn't be restored and you get a message that "an unknown error occurred [error number]," use these steps.
Read more >
Unknown error - WebDriver - MDN Web Docs
The unknown element error is a WebDriver error that occurs when an unspecified error occurs in the driver whilst processing a command.
Read more >
Unknown Error. Code : -2145116137 - ManageEngine Pitstop
Hello, I'm having the exact same error on two patches. Any update on this issue could help me as well. Error: Unknown Error....
Read more >
Unknown error - how to solve related issues - Opster
How to troubleshoot Elasticsearch/OpenSearch log "Unknown error" a detailed guide including background on ES concepts: bootstrap.
Read more >
#UNKNOWN! error - Microsoft Support
The #UNKNOWN! error indicates a unknown data type that is not currently supported in this version of Excel. If you need to work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found