TX011

<Image src> ללא DOM

מסוף

Text.js error TX011: <Image src> needs a DOM; pass `pixels` instead.

למה זה קורה

<Image src> מפענח תמונות באמצעות <img> ו-canvas. אין כאן document (טרמינל, שרת, בדיקות), ולכן אי אפשר לטעון את כתובת ה-URL.

איך לתקן

יש לפענח את התמונה ולהעביר פיקסלים בפורמט RGBA:

<Image pixels={{ width: 64, height: 64, data: rgba }} width={32} />