Referenceerror: Textencoder Is Not Defined With Mongodb Nodes June 16, 2024 Post a Comment I am trying to run jest test cases but I am facing error - ReferenceError: TextEncoder is not defined . Node version -14.18.0. Mongodb NPM - 4.1.3 . Typescript version - 4.4.3. BSolution 1: Ok the problem got solved.I have added at the top --global.TextEncoder = require("util").TextEncoder;global.TextDecoder = require("util").TextDecoder;CopyNot sure why the error was showing. Share Post a Comment for "Referenceerror: Textencoder Is Not Defined With Mongodb Nodes"
Post a Comment for "Referenceerror: Textencoder Is Not Defined With Mongodb Nodes"