Unable to read image file or buffer. It is giving an error stating read is not function
here is my code written in nodjs
const Jimp = require('jimp');
async function jmpRead(){
let img = await Jimp.read('blank.jpg');
}
jmpRead();
Current Behavior
let img = await Jimp.read('blank.jpg');
^
TypeError: Jimp.read is not a function
Failure Information (for bugs)
node test4.js
/opt/projects/faceai/samples/faceapi/test4.js:5
let img = await Jimp.read('blank.jpg');
^
TypeError: Jimp.read is not a function
at jmpRead (/opt/projects/faceai/samples/faceapi/test4.js:5:26)
at Object. (/opt/projects/faceai/samples/faceapi/test4.js:8:1)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49
Node.js v20.17.0
Steps to Reproduce
just run above simple code
IF YOUR ISSUE DEPENDS ON A PARTICULAR IMAGE BE SURE TO INCLUDE THIS AS WELL. WE CAN'T REPRODUCE IF WE DON'T HAVE YOUR IMAGE
Expected Behavior
Unable to read image file or buffer. It is giving an error stating read is not function
here is my code written in nodjs
const Jimp = require('jimp');
async function jmpRead(){
}
jmpRead();
Current Behavior
let img = await Jimp.read('blank.jpg'); ^
TypeError: Jimp.read is not a function
Failure Information (for bugs)
node test4.js /opt/projects/faceai/samples/faceapi/test4.js:5 let img = await Jimp.read('blank.jpg'); ^
TypeError: Jimp.read is not a function at jmpRead (/opt/projects/faceai/samples/faceapi/test4.js:5:26) at Object. (/opt/projects/faceai/samples/faceapi/test4.js:8:1)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49
Node.js v20.17.0
Steps to Reproduce
just run above simple code
IF YOUR ISSUE DEPENDS ON A PARTICULAR IMAGE BE SURE TO INCLUDE THIS AS WELL. WE CAN'T REPRODUCE IF WE DON'T HAVE YOUR IMAGE
Screenshots
Context
Failure Logs