I got this error when trying to build a typescript project using @ovotech/castle:
node_modules/@ovotech/castle/node_modules/@ovotech/avro-kafkajs/dist/AvroTransformBatch.d.ts:4:23 - error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
4 import * as Long from 'long';
Using node 20.5.1 and typescript 5.1.6 with esModuleInterop enabled in tsconfig.json.
I think its related to this issue. If I replace the offending line:
import * as Long from 'long';
with
import Long = require('long');
The build completes
I got this error when trying to build a typescript project using
@ovotech/castle:Using node 20.5.1 and typescript 5.1.6 with
esModuleInteropenabled intsconfig.json.I think its related to this issue. If I replace the offending line:
with
The build completes