TypeError: Cannot read properties of undefined (reading 'addText')
at Function.markText (index.js:51:32)
at _callee9$ (CustomerLook.js:1116:11)
at tryCatch (regeneratorRuntime.js:44:17)
at Generator. (regeneratorRuntime.js:125:22)
at Generator.next (regeneratorRuntime.js:69:21)
at tryCatch (regeneratorRuntime.js:44:17)
at invoke (regeneratorRuntime.js:75:20)
at regeneratorRuntime.js:96:13
at tryCallTwo (core.js:45:5)
at doResolve (core.js:200:13)
This is an error message
TypeError: Cannot read properties of undefined (reading 'addText') at Function.markText (index.js:51:32) at _callee9$ (CustomerLook.js:1116:11) at tryCatch (regeneratorRuntime.js:44:17) at Generator. (regeneratorRuntime.js:125:22)
at Generator.next (regeneratorRuntime.js:69:21)
at tryCatch (regeneratorRuntime.js:44:17)
at invoke (regeneratorRuntime.js:75:20)
at regeneratorRuntime.js:96:13
at tryCallTwo (core.js:45:5)
at doResolve (core.js:200:13)
Here is the source code
let markImage = await ImageMarker.markText({ src: image.path, // text:
${agentInfo?.ogzStoreGroupName}-${agentInfo?.name}\n${moment().format('YYYY-MM-DD hh:mm:ss')}
, text:'dsfjsjf', // position: 'bottomLeft', X: ScreenUtil.scaleSize(30), // 文字位置 Y: 1500, color: '#FFFFFF', fontName: 'PingFangSC-Regular', fontSize: 32, scale: 1, quality: 100, maxSize: 2048, filename: image.filename, shadowStyle: null, textBackgroundStyle: null, saveFormat: ImageFormat.jpg, });