Turbo SDKArNS Names (paid with Turbo Credits)
Dependency note (@solana/codecs)
ArNS/ARIO support pulls in @solana/spl-token, whose transitive @solana/spl-token-metadata@0.1.6 imports getDataEnumCodec from @solana/codecs@2.0.0-rc.1. In @solana/codecs@3+ that export was renamed to getDiscriminatedUnionCodec. If a web app dedupes @solana/codecs to 6.x for its whole dependency graph, spl-token-metadata's getDataEnumCodec import resolves to a version that no longer exports it, and the build breaks.
There is no single codecs version that satisfies both spl-token-metadata (needs the old getDataEnumCodec) and @solana/kit (needs 5.x), and spl-token-metadata has no release that uses the renamed API — so the fix belongs at the app's dependency-resolution layer, not at symbol-aliasing:
- Recommended: stop deduping
@solana/codecsso@solana/spl-token-metadatakeeps its own nested2.0.0-rc.1copy. In Vite, ensure@solana/codecsis not inresolve.dedupe; with pnpm/yarn, allow the nested version (avoid a hoisted-to-6.xoverride for that subtree). This is cleaner than thegetDataEnumCodec → getDiscriminatedUnionCodecalias plugin some apps use today, and removes the need for that shim. - If you must keep a single hoisted codecs copy, a build-time alias mapping
getDataEnumCodectogetDiscriminatedUnionCodecremains the fallback.
How is this guide?