Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
Canvas loadImage promise not resolving yet is complete

Hey guys i'm trying to load a image on top of a canvas with the canvas package like the following

const blankCanvas = canvas.createCanvas(52,52).getContext("2d");

for(const trait in metaData) {
  if (trait === 'token' || metaData[trait] === 'none') {
    continue;
  }

  const img = await canvas.loadImage(`${trait}/${metaData[trait]}.png`)

This img promise never gets resolved and gets stuck. When i do

  const img = canvas.loadImage(`${trait}/${metaData[trait]}.png`)

  console.log(img);

This shows me the following line which is why i think it is actually complete:

   Promise { [Image:51x51 background/hell.png complete] }

Why is the await not resolving the promising and is it getting stuck there. Anyone knows?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!