Closed KoenRijpstra closed 4 months ago
Hi @KoenRijpstra! Thanks for opening the issue, I will investigate and get back to you
It looks like the issue you're encountering is related to how bun handles package resolutions, specifically with different versions of borsh
. When using npm, everything works fine. You can see more details here on this test repo https://github.com/dr497/test-issue/tree/main
Our SDK does not have a dependency on @metaplex-foundation. The error you're seeing (TypeError: Cannot read properties of undefined (reading 'prototype'))
seems to be related to how bun resolves borsh dependencies. In version 2.3.3
of @bonfida/spl-name-service
, we upgraded to borsh 1.0.0
. This change might be causing conflicts with other packages that rely on older versions of borsh.
To resolve this, you might want to try using npm instead of bun, or ensure that all packages in your project are compatible with borsh >= 1.0.0
.
Thanks, that explains a lot! Will lock it to 2.3.2 for now and maybe I can use overrides
to fix the issue.
Using a clean next project and installing both @solflare-wallet/utl-sdk and @bonfida/spl-name-service results in the following error when using @solflare-wallet/utl-sdk:
After investigating, I found that the issue started with @bonfida/spl-name-service version 2.3.3. It's unclear whether the problem lies with @solflare-wallet/utl-sdk or @bonfida/spl-name-service.
Steps to Reproduce:
Create a new Next.js app with default settings:
Install the required packages:
Replace the content of
page.tsx
with the following code:Start the development server: