Doesn't work with react
See original GitHub issueMy App.tsx’s constructor looks like the following in my react app
constructor() {
super();
figlet('Sezzle', 'Standard', function(err, data) {
if (err) {
console.log('Something went wrong...');
console.dir(err);
return;
}
console.log(data);
});
}
But the output in the console is
Error: FIGlet header contains invalid values.
at Function.me.parseFont (eval at ./node_modules/figlet/lib/figlet.js (http://localhost:3000/main.js:969:1), <anonymous>:842:19)
at eval (eval at ./node_modules/figlet/lib/figlet.js (http://localhost:3000/main.js:969:1), <anonymous>:951:31)
at <anonymous>
I logged in the node module’s parseFont
function and I see that the headerData
looks like this:
["<!doctype", "html>"]
which is why the opts
in the function is not being filled.
Please help.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Create React App not working - Stack Overflow
In my case, "create-react-app" was not installed. to install run this command npm install -g create-react-app. Once installation successful ...
Read more >What To Do if create-react-app Doesn't Work
1. npm uninstall -g create-react-app ... This is the npm command to uninstall your global installation of create-react-app . Theoretically, when ...
Read more >React App Not Working? 4 Quick Debugging Tips - Dave Ceddia
Refresh the page - Manually refresh the page. Hit Cmd + Shift + R (Mac) or Shift + F5 (Windows). The Shift is...
Read more >Having problems with your React App not loading and ...
Yea, I guess this could be an old problem but I just want to share what helped me in case somebody else is...
Read more >Troubleshooting | React Navigation
Sometimes it might even be due to a corrupt installation. If clearing cache didn't work, try deleting your node_modules folder and run npm...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For apps that use webpack, I’ve added a directory of importable-fonts, they can be used like this:
It seems to work well for me so far, I’m still doing testing on it so I haven’t publicly documented this (though the importable-fonts are in the latest npm release), but this will most likely be the best way to use the library with React.
I’ve found a solution, but I’m coding in Vue, I think i doesn’t matters