Uncaught ReferenceError: canvas is not defined
Unanswered
European hornet posted this in #help-forum
European hornetOP
I keep getting this error:
This is the code:
I need canvas so I can get the size of the image before rendering it. If anyone knows a better way or how to fix this error, please help.
Uncaught ReferenceError: canvas is not defined
at 1498 (page-8f131769d0092880.js:1:4476)
at s (webpack-eb198566f24169dc.js:1:151)
at 2046 (page-8f131769d0092880.js:1:307)
at s (webpack-eb198566f24169dc.js:1:151)
at w (769-dd5faadeb1bf51ce.js:9:4271)
at j (769-dd5faadeb1bf51ce.js:9:3444)
at 769-dd5faadeb1bf51ce.js:9:5876This is the code:
import { Image } from "canvas";
.
.
.
let img = new Image();I need canvas so I can get the size of the image before rendering it. If anyone knows a better way or how to fix this error, please help.
1 Reply
Greenish Elaenia
What is "canvas" in the import statement?
Is that supposed to be a library or smt?
Is that supposed to be a library or smt?