When working with typescript, I have been incorporating flatbuffers in the following manner:
import {flatbuffers} from 'flatbuffers';
const builder = new flatbuffers.Builder(1);
Subsequently, I convert to js for integration with react-native:
const flatbuffers_1 = require("flatbuffers");
const builder = new flatbuffers_1.flatbuffers.Builder(1);
However, an error arises:
undefined is not an object (evaluating 'new flatbuffers_1.flatbuffers.Builder')
What could be causing this issue?