Skip to content
Sign UpLog In
Profile icon

KarenTheKiller

@KarenTheKiller
  • Karen Bot

    Cover page
    Made with Python
    Recent comments (0)
  • Bernie Sanders.exe

    Cover page
    Made with Node.js
    Recent comments (0)
Repls
Community
KarenTheKiller
KarenTheKiller
shared a Post
1 year ago
How do I get context.font working
I'm using canvas on node.js and it shows an error when I use ctx.font = '60px sans-serif'; It shows this error: Fontconfig error: Cannot load default
SixBeeps
SixBeeps
Oh yeah, I kinda remember getting this error a while back while messing with canvas stuff. Try uploading a font directly to the Repl and using that.1 year ago
KarenTheKiller
KarenTheKiller
shared a Post
1 year ago
I'm trying to use fetch on node.js but it's showing an error saying "ReferenceError: fetch is not defined"
jamilnyc
jamilnyc
My Solution It was a little bit confusing at first, but after a lot of Googling around, I figured it out in this example here: (Replace the %40 with @, I'm having a difficult time escaping it) https://replit.com/%40jamilnyc/Making-Multiple-API-Requests-with-Promises?v=1 Steps Add the node-fetch module using the Packages menu (on the left side of the editor, looks like a box). This will create package.json. Edit your package.json file to add the property "type": "commonjs" Use a dynamic impor8 months ago
SixBeeps
SixBeeps
You might need to actually install the module before using it. Could you link the Repl?1 year ago