Open andrewmackrodt opened 7 months ago
For now I've managed to work around this issue by creating the file (and updating my tsconfig typeRoots):
types/hash-wasm/index.d.ts:
declare module 'hash-wasm/dist/lib/WASMInterface' {
export type { IHasher } from 'hash-wasm/dist/lib/WASMInterface.js'
}
Some other dependency issues are covered in https://github.com/webrecorder/warcio.js/pull/64, e.g. I've added the following devDependencies
to my project:
"@types/pako": "^1.0.0",
"@types/stream-buffers": "^3.0.4"
I'm including
warcio
in an ESM Node.js 20 monorepo with TypeScript 5.3.2 and am experiencing build failure when runningtsc --build
. The relevanttsconfig.json
entries are:The error is:
Adding
.js
suffix to theIHasher
import fixes the issue although I don't know how that would affect cjs builds: https://github.com/webrecorder/warcio.js/blob/397c2a6e319c9a8c1e28e7d6ea6113dc12eb3049/src/lib/warcserializer.ts#L6