You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After looking into it it seem that avro-decimal does not work with versions of decimal.js bigger than 10.2.1. Seems like they've changed something in exports and the value no longer recognized as instanceof Decimal.
Downgrading it fixes the issue.
/Users/tim.shilov/IdeaProjects/affiliate-etl/node_modules/.pnpm/@[email protected][email protected]/node_modules/@ovotech/avro-decimal/dist/index.js:63
throw new Error('expecting Decimal type');
^
Error: expecting Decimal type
at AvroDecimal._toValue (/Users/tim.shilov/IdeaProjects/affiliate-etl/node_modules/.pnpm/@[email protected][email protected]/node_modules/@ovotech/avro-decimal/dist/index.js:63:20)
at LogicalType._write (/Users/tim.shilov/IdeaProjects/affiliate-etl/node_modules/.pnpm/[email protected]/node_modules/avsc/lib/types.js:2627:40)
at Type.toBuffer (/Users/tim.shilov/IdeaProjects/affiliate-etl/node_modules/.pnpm/[email protected]/node_modules/avsc/lib/types.js:658:8)
at file:///Users/tim.shilov/IdeaProjects/affiliate-etl/apps/etl-engine/src/decimal-test.js:16:29
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Node.js v20.12.1
The text was updated successfully, but these errors were encountered:
I've been trying to make example code (https://github.com/ovotech/castle/blob/main/packages/avro-decimal/examples/simple.ts) working and it was throwing an error.
After looking into it it seem that
avro-decimal
does not work with versions ofdecimal.js
bigger than10.2.1
. Seems like they've changed something in exports and the value no longer recognized asinstanceof Decimal
.Downgrading it fixes the issue.
Examples:
[email protected]
[email protected]
decimal.js
):That throws this error:
The text was updated successfully, but these errors were encountered: