this.util.TextEncoder is not a constructor only in electron app (works in chrome)
问题 I am creating a body segmentation app using tensorflow bodypix model. It works fine in the browser. I am using webpack to use its modules(see below) import * as wasm from "@tensorflow/tfjs-backend-wasm"; import * as tf from "@tensorflow/tfjs-core"; import * as bodyPix from "@tensorflow-models/body-pix"; wasm.setWasmPaths("./wasm/"); tf.setBackend("wasm").then(() => { //some simple vanilla js code }); //some more vanilla js code... It works exactly fine in chrome and giving output as expected