This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
Issue with ReadonlyUint8Array not being exported from @solana/codecs #2941
Labels
bug
Something isn't working
Overview
While trying to build a typescript project, the build fails because of a dependency error from the @solana/codecs package.
Error: Module '"@solana/codecs"' has no exported member 'ReadonlyUint8Array'.
Steps to reproduce
Setup empty typescript project using Node 18.20.4
install latest version of @solana/web3.js
try to use tsc command to build project
Description of bug
I have tried many versions going back to 1.77.4 without luck, it seems to be an issue where the ReadonlyUint8Array is not being built and/or exported anymore. I have also tried installing @solana/codecs explicitly without luck as well.
FULL LOG:
`
$tsc
node_modules/@solana/codecs-data-structures/dist/types/bytes.d.ts:1:10 - error TS2305: Module '"@solana/codecs-core"' has no exported member 'ReadonlyUint8Array'.
1 import { ReadonlyUint8Array, VariableSizeCodec, VariableSizeDecoder, VariableSizeEncoder } from '@solana/codecs-core';
~~~~~~~~~~~~~~~~~~
node_modules/@solana/codecs-data-structures/dist/types/constant.d.ts:1:62 - error TS2305: Module '"@solana/codecs-core"' has no exported member 'ReadonlyUint8Array'.
1 import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, ReadonlyUint8Array } from '@solana/codecs-core';
~~~~~~~~~~~~~~~~~~
node_modules/@solana/codecs-data-structures/dist/types/nullable.d.ts:1:87 - error TS2305: Module '"@solana/codecs-core"' has no exported member 'ReadonlyUint8Array'.
1 import { Codec, Decoder, Encoder, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, ReadonlyUint8Array, VariableSizeCodec, VariableSizeDecoder, VariableSizeEncoder } from '@solana/codecs-core';
~~~~~~~~~~~~~~~~~~
node_modules/@solana/codecs-data-structures/dist/types/union.d.ts:1:43 - error TS2305: Module '"@solana/codecs-core"' has no exported member 'ReadonlyUint8Array'.
1 import { Codec, Decoder, Encoder, Offset, ReadonlyUint8Array } from '@solana/codecs-core';
~~~~~~~~~~~~~~~~~~
node_modules/@solana/spl-token-group/lib/types/state/tokenGroup.d.ts:2:15 - error TS2305: Module '"@solana/codecs"' has no exported member 'ReadonlyUint8Array'.
2 import type { ReadonlyUint8Array } from '@solana/codecs';
~~~~~~~~~~~~~~~~~~
node_modules/@solana/spl-token-group/lib/types/state/tokenGroupMember.d.ts:2:15 - error TS2305: Module '"@solana/codecs"' has no exported member 'ReadonlyUint8Array'.
2 import type { ReadonlyUint8Array } from '@solana/codecs';
~~~~~~~~~~~~~~~~~~
Found 6 errors in 6 files.
Errors Files
1 node_modules/@solana/codecs-data-structures/dist/types/bytes.d.ts:1
1 node_modules/@solana/codecs-data-structures/dist/types/constant.d.ts:1
1 node_modules/@solana/codecs-data-structures/dist/types/nullable.d.ts:1
1 node_modules/@solana/codecs-data-structures/dist/types/union.d.ts:1
1 node_modules/@solana/spl-token-group/lib/types/state/tokenGroup.d.ts:2
1 node_modules/@solana/spl-token-group/lib/types/state/tokenGroupMember.d.ts:2
`
The text was updated successfully, but these errors were encountered: