-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
As it stands now, it's not possible to use @bonfida/spl-name-service or @bonfida/sns-records in TypeScript projects due to misconfiguration of exports.
While I'm able to access the exported functions using JavaScript, trying to build a TypeScript project with these modules fails.
Example:
$ npm run build
> react-agent-graph@0.0.1 build
> tsc
src/helpers/solana/snsRecord.ts:8:10 - error TS2305: Module '"@bonfida/spl-name-service"' has no exported member 'getDomainKeySync'.
8 import { getDomainKeySync, NameRegistryState } from "@bonfida/spl-name-service";
~~~~~~~~~~~~~~~~
src/helpers/solana/snsRecord.ts:8:28 - error TS2305: Module '"@bonfida/spl-name-service"' has no exported member 'NameRegistryState'.
8 import { getDomainKeySync, NameRegistryState } from "@bonfida/spl-name-service";
~~~~~~~~~~~~~~~~~
src/helpers/solana/snsRecord.ts:9:10 - error TS2305: Module '"@bonfida/sns-records"' has no exported member 'CENTRAL_STATE_SNS_RECORDS'.
9 import { CENTRAL_STATE_SNS_RECORDS } from "@bonfida/sns-records";
~~~~~~~~~~~~~~~~~~~~~~~~~
src/helpers/solana/snsResolver.ts:1:10 - error TS2305: Module '"@bonfida/spl-name-service"' has no exported member 'getDomainKeySync'.
1 import { getDomainKeySync, NameRegistryState } from '@bonfida/spl-name-service';
~~~~~~~~~~~~~~~~
src/helpers/solana/snsResolver.ts:1:28 - error TS2305: Module '"@bonfida/spl-name-service"' has no exported member 'NameRegistryState'.
1 import { getDomainKeySync, NameRegistryState } from '@bonfida/spl-name-service';
~~~~~~~~~~~~~~~~~
src/helpers/solana/snsResolver.ts:2:10 - error TS2305: Module '"@bonfida/sns-records"' has no exported member 'Record'.
2 import { Record as SnsRecord, Validation } from "@bonfida/sns-records";
~~~~~~
src/helpers/solana/snsResolver.ts:2:31 - error TS2305: Module '"@bonfida/sns-records"' has no exported member 'Validation'.
2 import { Record as SnsRecord, Validation } from "@bonfida/sns-records";
~~~~~~~~~~
Found 7 errors in 2 files.
Errors Files
3 src/helpers/solana/snsRecord.ts:8
4 src/helpers/solana/snsResolver.ts:1
I've looked things over and there's no clear indicator for why their failing, but clearly the entire npm package needs to be overhauled. I've seen another user with the same issue in the comments on this Solana SO thread
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels