Skip to content
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

Closed
chonbon opened this issue Jul 15, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@chonbon
Copy link

chonbon commented Jul 15, 2024

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
`

@chonbon chonbon added the bug Something isn't working label Jul 15, 2024
@chonbon chonbon closed this as completed Jul 15, 2024
Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant