You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using @keypom/[email protected], I get the following error from the borsh library when calling createDrop().
Error: Class PublicKey is missing in schema: publicKey
at serializeStruct (/Users/bobby/workspace/rownd/api-server/node_modules/borsh/lib/index.js:323:15)
at serializeField (/Users/bobby/workspace/rownd/api-server/node_modules/borsh/lib/index.js:306:13)
at /Users/bobby/workspace/rownd/api-server/node_modules/borsh/lib/index.js:327:13
at Array.map (<anonymous>)
at serializeStruct (/Users/bobby/workspace/rownd/api-server/node_modules/borsh/lib/index.js:326:29)
at serialize (/Users/bobby/workspace/rownd/api-server/node_modules/borsh/lib/index.js:349:5)
at encodeTransaction (/Users/bobby/workspace/rownd/api-server/node_modules/@near-js/transactions/lib/schema.js:33:34)
at /Users/bobby/workspace/rownd/api-server/node_modules/@near-js/transactions/lib/sign.js:30:56
at Generator.next (<anonymous>)
at /Users/bobby/workspace/rownd/api-server/node_modules/@near-js/transactions/lib/sign.js:8:71
Examining the versions of @near-js/xxxx in my package-lock.json file revealed multiple resolved versions of @near-js/crypto (0.0.4 and 0.0.5). The web of peer dependencies and dependencies of those @near-js/xxxx packages is a mess, but I finally got a workaround by installing specific versions of three packages in my package.json
With those specific versions installed, I can now call createDrop() without any issues. This should get fixed at the @keypom/core level so everything works out of the box for everyone.
The text was updated successfully, but these errors were encountered:
When using @keypom/[email protected], I get the following error from the borsh library when calling createDrop().
This seems to be related to a known bug documented in
near-api-js
https://docs.near.org/tools/near-api-js/faq#class-x-is-missing-in-schema-publickey caused by importing multiple versions of near dependencies. It at least got me looking in the right direction for a workaround.Examining the versions of @near-js/xxxx in my package-lock.json file revealed multiple resolved versions of
@near-js/crypto
(0.0.4 and 0.0.5). The web of peer dependencies and dependencies of those@near-js/xxxx
packages is a mess, but I finally got a workaround by installing specific versions of three packages in my package.jsonWith those specific versions installed, I can now call createDrop() without any issues. This should get fixed at the @keypom/core level so everything works out of the box for everyone.
The text was updated successfully, but these errors were encountered: