Decoding draco buffer data after encoding in javascript gives unknown geometry type

I am trying to convert an obj file to draco using javascript by following the steps from here: https://gist.github.com/Ni55aN/94d322d304a8ffc417dc0cf05d3ad531

When I try to decode it, I am getting an error ‘Unknown Geometry type’. The logged value of the Geometry type is 165 whereas the decode function only accepts 0 (POINT_CLOUD) and 1 (TRIANGULAR_MESH).

To decode, I write the encoded buffer to a file and then decode using decodeDracoData() in this: https://github.com/google/draco/blob/79601d2d060be52e673a82ed1c46f4666eb28255/javascript/npm/draco3d/draco_nodejs_example.js

My overall objective is to convert a set of objs to a single draco file with some added parameters. While converting a set of objs to draco is simple using the terminal, I need to add some extra data to the file, so I’m trying to convert the obj to buffer using the encoderModule in draco3d, and then writing the buffer to a file. draco3d also provides a decoderModule, but trying to parse the generated file with the decoder simply returns an unknown geometry type.

I’m not sure how to proceed and will be really grateful for any pointers on possible solutions.