Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Conversation

@joncinque
Copy link
Contributor

Problem

There's an issue for downstream users of the build because there's a confusion between the locally used buffer-layout and the one used by borsh, which manifests as:

*/node_modules/buffer-layout/lib/Layout.js:1158
      throw new TypeError('fields must be array of Layout instances');
      ^

TypeError: fields must be array of Layout instances
    at new Structure (/Users/user/frontproject/earn-web3-node/node_modules/buffer-layout/lib/Layout.js:1158:13)
    at exports.struct (/Users/user/frontproject/earn-web3-node/node_modules/buffer-layout/lib/Layout.js:2688:57)
    at Object.<anonymous> (/Users/user/frontproject/earn-web3-node/node_modules/@solana/spl-stake-pool/dist/index.cjs.js:855:31)

Solution

Remove the borsh dependency and just use what's needed from buffer-layout directly.

@joncinque joncinque merged commit df6ad18 into solana-labs:master Jun 4, 2024
@joncinque joncinque deleted the spjsfix branch June 4, 2024 20:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant